All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nz.co.gregs.dbvolution.annotations.DBTableName Maven / Gradle / Ivy

package nz.co.gregs.dbvolution.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * {@code DBTableName} indicates the name of the database table that this
 * {@code DBRow} implementation refers to.  
 * 
 * 
* @DBTableName("my_table") public class MyTable extends DBRow { *
* *

* {@code DBTableName} allows you to change the class name without affecting * database functionality and is highly recommended. Extending DBRow is * sufficient to indicate that class is associated with a table, however this * causes the class to be tightly bound to the database and subtracts from the * benefits of DBvolution. * *

* This annotation is inherited by subclasses. * *

* DBTableName is generated automatically by DBTableClassGenerator. * *

Support DBvolution at * Patreon

* * @author Gregory Graham */ @Target(ElementType.TYPE) @Inherited @Retention(RetentionPolicy.RUNTIME) public @interface DBTableName { /** * The raw table name as stored in the database. * *

Support DBvolution at * Patreon

* * @return the table name. */ String value(); /** * The raw schema name as stored in the database. * *

Support DBvolution at * Patreon

* * @return the schema name. */ String schema() default ""; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy