|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.castor.core.nature.BaseNature
org.castor.jdo.jpa.natures.JPAFieldNature
public class JPAFieldNature
A BaseNature extension, that gives access to information derived from
field bound JPA annotations.
PropertyHolder| Constructor Summary | |
|---|---|
JPAFieldNature(PropertyHolder holder)
Instantiate a JPAFieldNature to access the given
PropertyHolder. |
|
| Methods inherited from class org.castor.core.nature.BaseNature |
|---|
getBooleanPropertyDefaultFalse, getHolder, getProperty, getPropertyAsList, getPropertyAsMap, setProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JPAFieldNature(PropertyHolder holder)
JPAFieldNature to access the given
PropertyHolder.
holder - The underlying PropertyHolder (obviously a
FieldInfo).PropertyHolder| Method Detail |
|---|
public final String getId()
Nature.getId()public FieldInfo getFieldInfo()
FieldInfo (the PropertyHolder).
FieldInfo. If the PropertyHolder
was not of type FieldInfo, null is returned.public final void setBasicFetch(javax.persistence.FetchType fetch)
fetch - The value of Basic.fetch()BASIC_FETCHpublic final javax.persistence.FetchType getBasicFetch()
Basic.fetch()BASIC_FETCHpublic final void setBasicOptional(boolean optional)
optional - The value of Basic.optional()BASIC_OPTIONALpublic final boolean isBasicOptional()
Basic.optional() was set to
true on the field.BASIC_OPTIONALpublic final void setColumnName(String name)
name - The value of Column.name()COLUMN_NAMEpublic final String getColumnName()
Column.name()COLUMN_NAMEpublic final void setColumnDefinition(String columnDefinition)
columnDefinition - The value of
Column.columnDefinition()COLUMN_DEFINITIONpublic final String getColumnDefinition()
Column.columnDefinition()COLUMN_DEFINITIONpublic final void setColumnLength(int length)
length - The value of Column.length()COLUMN_LENGTHpublic final Integer getColumnLength()
Column.length()COLUMN_LENGTHpublic final void setColumnInsertable(boolean insertable)
insertable - The value of Column.insertable()COLUMN_INSERTABLEpublic final Boolean getColumnInsertable()
Column.insertable()COLUMN_INSERTABLEpublic final void setColumnNullable(boolean nullable)
nullable - The value of Column.nullable()COLUMN_NULLABLEpublic final Boolean getColumnNullable()
Column.nullable()COLUMN_NULLABLEpublic final void setColumnPrecision(int precision)
precision - The value of Column.precision()COLUMN_PRECISIONpublic final Integer getColumnPrecision()
Column.precision()COLUMN_PRECISIONpublic final void setColumnScale(int scale)
scale - The value of Column.scale()COLUMN_SCALEpublic final Integer getColumnScale()
Column.scale()COLUMN_SCALEpublic final void setColumnTable(String table)
table - The value of Column.table()COLUMN_TABLEpublic final String getColumnTable()
Column.table()COLUMN_TABLEpublic final void setColumnUnique(boolean unique)
unique - The value of Column.unique()COLUMN_UNIQUEpublic final Boolean getColumnUnique()
Column.unique()COLUMN_UNIQUEpublic final void setColumnUpdatable(boolean updatable)
updatable - The value of Column.updatable()COLUMN_UPDATABLEpublic final Boolean getColumnUpdatable()
Column.updatable()COLUMN_UPDATABLEpublic final void setId(boolean isId)
isId - If Id was found on that property.IDpublic final boolean isId()
Id was set on the property,
else false.IDpublic final void setTransient(boolean isTransient)
isTransient - if Transient was found on that
property.TRANSIENTpublic final boolean isTransient()
Transient was set on the
property, else falseTRANSIENTpublic void setJoinTableName(String tablename)
tablename - The value of JoinTable.name()JOINTABLE_NAMEpublic String getJoinTableName()
JoinTable.name()JOINTABLE_NAMEpublic void setJoinTableCatalog(String catalog)
catalog - The value of JoinTable.catalog()JOINTABLE_CATALOGpublic String getJoinTableCatalog()
JoinTable.catalog()JOINTABLE_CATALOGpublic void setJoinTableSchema(String schema)
schema - The value of JoinTable.schema()JOINTABLE_SCHEMApublic String getJoinTableSchema()
JoinTable.schema()#TABLE_SCHEMApublic void setJoinTableJoinColumns(javax.persistence.JoinColumn[] joinColumns)
joinColumns - The value of JoinTable.joinColumns()JOINTABLE_JOINCOLUMNSpublic javax.persistence.JoinColumn[] getJoinTableJoinColumns()
JoinTable.joinColumns()JOINTABLE_JOINCOLUMNSpublic void setJoinTableInverseJoinColumns(javax.persistence.JoinColumn[] inverseJoinColumns)
inverseJoinColumns - The value of
JoinTable.inverseJoinColumns()JOINTABLE_INVERSE_JOINCOLUMNSpublic javax.persistence.JoinColumn[] getJoinTableInverseJoinColumns()
JoinTable.inverseJoinColumns()JOINTABLE_INVERSE_JOINCOLUMNSpublic final void setJoinColumnName(String name)
name - The value of JoinColumn.name().JOINCOLUMN_NAMEpublic final String getJoinColumnName()
JoinColumn.name().JOINCOLUMN_NAMEpublic final void setJoinColumnReferencedColumnName(String referencedColumnName)
referencedColumnName - The value of
JoinColumn.referencedColumnName().JOINCOLUMN_REFERENCEDCOLUMNNAMEpublic final String getJoinColumnReferencedColumnName()
JoinColumn.referencedColumnName().JOINCOLUMN_REFERENCEDCOLUMNNAMEpublic final void setJoinColumnUnique(boolean unique)
unique - The value of JoinColumn.unique().JOINCOLUMN_UNIQUEpublic final Boolean getJoinColumnUnique()
JoinColumn.unique().JOINCOLUMN_UNIQUEpublic final void setJoinColumnNullable(boolean nullable)
nullable - The value of JoinColumn.nullable().JOINCOLUMN_NULLABLEpublic final Boolean getJoinColumnNullable()
JoinColumn.nullable().JOINCOLUMN_NULLABLEpublic final void setJoinColumnInsertable(boolean insertable)
insertable - The value of JoinColumn.insertable()
.JOINCOLUMN_INSERTABLEpublic final Boolean getJoinColumnInsertable()
JoinColumn.insertable().JOINCOLUMN_INSERTABLEpublic final void setJoinColumnUpdatable(boolean updatable)
updatable - The value of JoinColumn.updatable().JOINCOLUMN_UPDATABLEpublic final Boolean getJoinColumnUpdatable()
JoinColumn.updatable().JOINCOLUMN_UPDATABLEpublic final void setJoinColumnColumnDefinition(String columnDefinition)
columnDefinition - The value of
JoinColumn.columnDefinition().JOINCOLUMN_COLUMNDEFINITIONpublic final String getJoinColumnColumnDefinition()
JoinColumn.columnDefinition().JOINCOLUMN_COLUMNDEFINITIONpublic final void setJoinColumnTable(String table)
table - The value of JoinColumn.table().JOINCOLUMN_TABLEpublic final String getJoinColumnTable()
JoinColumn.table().JOINCOLUMN_TABLEpublic void setOneToOne(boolean hasOneToOne)
hasOneToOne - if OneToOne was found on that
property.ONETOONEpublic boolean isOneToOne()
OneToOne was set on the property,
else false.ONETOONEpublic void setManyToOne(boolean hasManyToOne)
hasManyToOne - if ManyToOne was found on that
property.MANYTOONEpublic boolean isManyToOne()
ManyToOne was set on the property,
else false.MANYTOONEpublic void setOneToMany(boolean hasOneToMany)
hasOneToMany - if OneToMany was found on that
property.ONETOMANYpublic boolean isOneToMany()
OneToMany was set on the property,
else false.ONETOMANYpublic void setManyToMany(boolean hasManyToMany)
hasManyToMany - if ManyToMany was found on that
property.MANYTOMANYpublic boolean isManyToMany()
ManyToOne was set on the property,
else false.MANYTOMANYpublic void setManyToManyInverseCopy(boolean copySettingsInverse)
copySettingsInverse - set this to true if a ManyToMany related field shall copy all
JoinTable relevant information from the other side of
the relation (inverting the JoinColumn settings).MANYTOMANY_INVERSECOPYpublic boolean isManyToManyInverseCopy()
JoinTable relevant information from the other side of the
relation (inverting the JoinColumn settings).MANYTOMANY_INVERSECOPYpublic void setRelationTargetEntity(Class<?> targetEntity)
targetEntity - The value of OneToOne.targetEntity()
, OneToMany.targetEntity(),
ManyToOne.targetEntity(),
ManyToMany.targetEntity(), depending
to the relation type.RELATION_TARGETENTITYpublic Class<?> getRelationTargetEntity()
OneToOne.targetEntity(),
OneToMany.targetEntity(),
ManyToOne.targetEntity(),
ManyToMany.targetEntity(), depending on
the relation type. Returns null iff no relational annotation was
set on the field.RELATION_TARGETENTITYpublic void setRelationLazyFetch(boolean lazyFetch)
lazyFetch - true if OneToOne.fetch() ,
OneToMany.fetch(),
ManyToOne.fetch(),
ManyToMany.fetch() is set to
FetchType.LAZY, depending on the
relation type.RELATION_LAZYFETCHpublic boolean isRelationLazyFetch()
OneToOne.fetch() ,
OneToMany.fetch(),
ManyToOne.fetch(),
ManyToMany.fetch() is set to
FetchType.LAZY, depending on the
relation type.RELATION_LAZYFETCHpublic void setRelationMappedBy(String mappedBy)
mappedBy - The content of OneToMany.mappedBy(),
ManyToMany.mappedBy(), depending on
the relation type.RELATION_MAPPEDBYpublic String getRelationMappedBy()
OneToMany.mappedBy(),
ManyToMany.mappedBy(), depending on the
relation type. If no (or an empty) String was set, null is
returned!RELATION_MAPPEDBYpublic Class<?> getRelationCollectionType()
OneToMany,
ManyToMany, depending on the relation
type. Returns null iff none of the above relational annotations
was set on the field.RELATION_COLLECTIONTYPEpublic void setRelationCollectionType(Class<?> collectionType)
collectionType - Set the type of Collection being used by
OneToMany,
ManyToMany, depending on the
relation type.RELATION_COLLECTIONTYPEpublic void setRelationOptional(boolean optional)
optional - Set the value of OneToOne.optional()
, ManyToOne.optional(), depending on
the relation type.RELATION_OPTIONALpublic boolean isRelationOptional()
OneToOne.optional(),
ManyToOne.optional() was set to true,
depending on the relation type.RELATION_OPTIONAL
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||