Class DbField
java.lang.Object
tech.ailef.dbadmin.external.dbmapping.DbField
Represent a field on the database, generated from an Entity class instance variable.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDbField
(String javaName, String name, Field field, DbFieldType type, DbObjectSchema schema, String format) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Class<?>
Returns the name of the Thymeleaf fragment used to render the input for this field.getName()
getType()
int
hashCode()
boolean
isBinary()
boolean
boolean
boolean
boolean
boolean
isImage()
boolean
boolean
boolean
boolean
Returns if this field is settable with a raw value, i.e.boolean
isText()
boolean
isToOne()
void
setConnectedType
(Class<?> connectedType) void
void
void
setNullable
(boolean nullable) void
setPrimaryKey
(boolean primaryKey) void
setSchema
(DbObjectSchema schema) void
setType
(DbFieldType type) toString()
-
Field Details
-
dbName
The inferred name of this field on the database -
javaName
The name of this field in the Java code (instance variable) -
type
The type of this field -
field
-
-
Constructor Details
-
DbField
public DbField(String javaName, String name, Field field, DbFieldType type, DbObjectSchema schema, String format)
-
-
Method Details
-
getJavaName
-
getSchema
-
getConnectedSchema
-
setSchema
-
getPrimitiveField
-
setField
-
getName
-
setName
-
getType
-
setType
-
setPrimaryKey
public void setPrimaryKey(boolean primaryKey) -
isPrimaryKey
public boolean isPrimaryKey() -
getConnectedType
-
setConnectedType
-
isForeignKey
public boolean isForeignKey() -
isNullable
public boolean isNullable() -
setNullable
public void setNullable(boolean nullable) -
isBinary
public boolean isBinary() -
isImage
public boolean isImage() -
getFormat
-
isText
public boolean isText() -
getFragmentName
Returns the name of the Thymeleaf fragment used to render the input for this field.- Returns:
-
isFilterable
public boolean isFilterable() -
isFilterableCategorical
public boolean isFilterableCategorical() -
isReadOnly
public boolean isReadOnly() -
isToOne
public boolean isToOne() -
isSettable
public boolean isSettable()Returns if this field is settable with a raw value, i.e. a field that is not a relationship to another entity;- Returns:
-
isGeneratedValue
public boolean isGeneratedValue() -
getAllValues
-
toString
-
hashCode
public int hashCode() -
equals
-