Class JDOOneToOneNature
java.lang.Object
org.castor.core.nature.BaseNature
org.exolab.castor.builder.info.nature.relation.JDOOneToOneNature
A
JDOOneToOneNature defines a one-to-one relation between two
FieldInfos.- Author:
- Lukas Lang, Filip Hianik
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddForeignKey(String column) Adds a column to the foreign key.Returns a List of s holding the columns of the foreign key.getId()Returns the Nature Id.booleanisDirty()Returns true if field will NOT be checked against the database for modification, otherwise false.booleanReturns true if no update on the column can be performed, false otherwise.voidsetDirty(boolean dirty) If set true, field will NOT be checked against the database for modification, otherwise set false.voidsetReadOnly(boolean readOnly) Sets the column read only.Methods inherited from class BaseNature
getBooleanPropertyDefaultFalse, getHolder, getProperty, getPropertyAsList, getPropertyAsMap, setPropertyModifier and TypeMethodDescriptionprotected final booleangetBooleanPropertyDefaultFalse(String propertyName) Returns boolean value of the property or false if property value is null.protected final PropertyHolderReturns thePropertyHolder.protected final ObjectgetProperty(String key) Returns the property mapped to the key or null if not set before.protected ListgetPropertyAsList(String property) Returns value of the property as a List.protected MapgetPropertyAsMap(String property) Returns value of the property as a List.protected final voidsetProperty(String key, Object property) Sets the property for a given.
-
Constructor Details
-
JDOOneToOneNature
-
-
Method Details
-
getId
-
isReadOnly
public boolean isReadOnly()Returns true if no update on the column can be performed, false otherwise. Default value is false.- Returns:
- true if readonly, false if not or not set.
-
setReadOnly
public void setReadOnly(boolean readOnly) Sets the column read only.- Parameters:
readOnly- true if read only.
-
isDirty
public boolean isDirty()Returns true if field will NOT be checked against the database for modification, otherwise false. Default value is false.- Returns:
- true if field is not updated, false if not or not set.
-
setDirty
public void setDirty(boolean dirty) If set true, field will NOT be checked against the database for modification, otherwise set false.- Parameters:
dirty- true if field should not be updated.
-
getForeignKeys
-
addForeignKey
Adds a column to the foreign key. By contract, the order of the key columns is not guaranteed and depends on the returned List implementation theBaseNatureis using.- Parameters:
column- The column name.
-