Class MappingFieldElementImpl
java.lang.Object
com.sun.jdo.api.persistence.model.mapping.impl.MappingElementImpl
com.sun.jdo.api.persistence.model.mapping.impl.MappingMemberElementImpl
com.sun.jdo.api.persistence.model.mapping.impl.MappingFieldElementImpl
- All Implemented Interfaces:
MappingElement,MappingElementProperties,MappingFieldElement,MappingMemberElement,Comparable
- Direct Known Subclasses:
MappingRelationshipElementImpl
public class MappingFieldElementImpl
extends MappingMemberElementImpl
implements MappingFieldElement
- Version:
- %I%
- Author:
- Mark Munro, Rochelle Raccah
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from interface com.sun.jdo.api.persistence.model.mapping.MappingElementProperties
PROP_ASSOCIATED_COLUMNS, PROP_COLUMNS, PROP_CONSISTENCY, PROP_DATABASE_ROOT, PROP_FETCH_GROUP, PROP_FIELDS, PROP_IN_CONCURRENCY_CHECK, PROP_KEY_COLUMNS, PROP_MODIFIED, PROP_NAME, PROP_NAVIGABLE, PROP_READ_ONLY, PROP_REFERENCING_KEYS, PROP_TABLE, PROP_TABLES, PROP_VERSION_FIELDFields inherited from interface com.sun.jdo.api.persistence.model.mapping.MappingFieldElement
GROUP_DEFAULT, GROUP_INDEPENDENT, GROUP_NONE -
Constructor Summary
ConstructorsConstructorDescriptionCreate new MappingFieldElementImpl with no corresponding name or declaring class.MappingFieldElementImpl(String name, MappingClassElement declaringClass) Create new MappingFieldElementImpl with the corresponding name and declaring class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumn(org.netbeans.modules.dbschema.DBMemberElement column) Adds a column to the list of columns mapped by this mapping field.intReturns the list of columns (ColumnElements) to which this mapping field is mapped.Returns the list of column names to which this mapping field is mapped.Returns the array of concurrency groups to which this field belongs.intGet the fetch group of this field element.intComputes the field number of this field element.booleanbooleanbooleanbooleanintbooleanbooleanbooleanbooleanDetermines whether this field element is in a concurrency check or not.protected booleanbooleanDetermines whether this field element is read only or not.booleanDetermines whether this field element is a version field or not.voidremoveColumn(String columnName) Removes a column from the list of columns mapped by this mapping field.voidsetCloneDepth(int cloneDepth) voidsetFetchGroup(int group) Set the fetch group of this field element.protected voidsetFetchGroupInternal(int group) Set the fetch group of this field element.voidsetInConcurrencyCheck(boolean flag) Set whether this field element is in a concurrency check or not.voidsetLogOnAccess(boolean flag) voidsetLogOnUpdate(boolean flag) voidsetModifyBeforeImageOnUpdate(boolean flag) voidsetObserveOnAccess(boolean flag) voidsetProperty(boolean flag, int propertyBit) voidsetReadOnly(boolean flag) Set whether this field element is read only or not.voidsetRecordOnUpdate(boolean flag) voidsetReferentialIntegrityUpdates(boolean flag) voidsetSendBeforeImage(boolean flag) voidsetVersion(boolean flag) Set whether this field element is a version field or not.protected voidBoston to Pilsen conversion.Methods inherited from class com.sun.jdo.api.persistence.model.mapping.impl.MappingMemberElementImpl
equals, firePropertyChange, fireVetoableChange, getDeclaringClass, hashCode, setDeclaringClassMethods inherited from class com.sun.jdo.api.persistence.model.mapping.impl.MappingElementImpl
addPropertyChangeListener, addVetoableChangeListener, compareTo, getMessages, getName, removePropertyChangeListener, removeVetoableChangeListener, setName, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.sun.jdo.api.persistence.model.mapping.MappingElement
addPropertyChangeListener, addVetoableChangeListener, getName, removePropertyChangeListener, removeVetoableChangeListener, setNameMethods inherited from interface com.sun.jdo.api.persistence.model.mapping.MappingMemberElement
getDeclaringClass
-
Field Details
-
CLONE_FIELD
public static final int CLONE_FIELD- See Also:
-
CLONE_DEEP
public static final int CLONE_DEEP- See Also:
-
CLONE_MASK
public static final int CLONE_MASK- See Also:
-
LOG_ON_ACCESS
public static final int LOG_ON_ACCESS- See Also:
-
LOG_ON_MASK
public static final int LOG_ON_MASK- See Also:
-
LOG_ON_UPDATE
public static final int LOG_ON_UPDATE- See Also:
-
MOD_BI_ON_UPDATE
public static final int MOD_BI_ON_UPDATE- See Also:
-
OBSERVE_ON_ACCESS
public static final int OBSERVE_ON_ACCESS- See Also:
-
RECORD_ON_UPDATE
public static final int RECORD_ON_UPDATE- See Also:
-
SEND_BEFORE_IMAGE
public static final int SEND_BEFORE_IMAGE- See Also:
-
READ_ONLY
public static final int READ_ONLY- See Also:
-
REF_INTEGRITY_UPDATES
public static final int REF_INTEGRITY_UPDATES- See Also:
-
IN_CONCURRENCY_CHECK
public static final int IN_CONCURRENCY_CHECK- See Also:
-
XLATE_FIELD
public static final int XLATE_FIELD- See Also:
-
-
Constructor Details
-
MappingFieldElementImpl
public MappingFieldElementImpl()Create new MappingFieldElementImpl with no corresponding name or declaring class. This constructor should only be used for cloning and archiving. -
MappingFieldElementImpl
Create new MappingFieldElementImpl with the corresponding name and declaring class.- Parameters:
name- the name of the elementdeclaringClass- the class to attach to
-
-
Method Details
-
isReadOnly
public boolean isReadOnly()Determines whether this field element is read only or not.- Specified by:
isReadOnlyin interfaceMappingFieldElement- Returns:
trueif the field is read only,falseotherwise
-
setReadOnly
Set whether this field element is read only or not.- Specified by:
setReadOnlyin interfaceMappingFieldElement- Parameters:
flag- - iftrue, the field element is marked as read only; otherwise, it is not- Throws:
ModelException- if impossible
-
isInConcurrencyCheck
public boolean isInConcurrencyCheck()Determines whether this field element is in a concurrency check or not.- Specified by:
isInConcurrencyCheckin interfaceMappingFieldElement- Returns:
trueif the field is in a concurrency check,falseotherwise
-
setInConcurrencyCheck
Set whether this field element is in a concurrency check or not.- Specified by:
setInConcurrencyCheckin interfaceMappingFieldElement- Parameters:
flag- - iftrue, the field element is marked as being in a concurrency check; otherwise, it is not- Throws:
ModelException- if impossible
-
isVersion
public boolean isVersion()Determines whether this field element is a version field or not.- Specified by:
isVersionin interfaceMappingFieldElement- Returns:
trueif the field is a version field,falseotherwise
-
setVersion
Set whether this field element is a version field or not.- Specified by:
setVersionin interfaceMappingFieldElement- Parameters:
flag- - iftrue, the field element is marked as a version field; otherwise, it is not- Throws:
ModelException- if impossible
-
getFetchGroup
public int getFetchGroup()Get the fetch group of this field element.- Specified by:
getFetchGroupin interfaceMappingFieldElement- Returns:
- the fetch group, one of
MappingFieldElement.GROUP_DEFAULT,MappingFieldElement.GROUP_NONE, or anything less than or equal toMappingFieldElement.GROUP_INDEPENDENT
-
setFetchGroup
Set the fetch group of this field element.- Specified by:
setFetchGroupin interfaceMappingFieldElement- Parameters:
group- - an integer indicating the fetch group, one of:MappingFieldElement.GROUP_DEFAULT,MappingFieldElement.GROUP_NONE, or anything less than or equal toMappingFieldElement.GROUP_INDEPENDENT- Throws:
ModelException- if impossible
-
setFetchGroupInternal
protected void setFetchGroupInternal(int group) Set the fetch group of this field element. Meant to be used in the constructor and by subclasses when there should be no exceptions and no property change events fired.- Parameters:
group- - an integer indicating the fetch group, one of:MappingFieldElement.GROUP_DEFAULT,MappingFieldElement.GROUP_NONE, or anything less than or equal toMappingFieldElement.GROUP_INDEPENDENT
-
getColumns
Returns the list of column names to which this mapping field is mapped.- Specified by:
getColumnsin interfaceMappingFieldElement- Returns:
- the names of the columns mapped by this mapping field
-
addColumn
Adds a column to the list of columns mapped by this mapping field.- Specified by:
addColumnin interfaceMappingFieldElement- Parameters:
column- column element to be added to the mapping- Throws:
ModelException- if impossible
-
removeColumn
Removes a column from the list of columns mapped by this mapping field. This method overrides the one in MappingFieldElement to remove the argument from the associated columns if necessary.- Specified by:
removeColumnin interfaceMappingFieldElement- Parameters:
columnName- the relative name of the column to be removed from the mapping- Throws:
ModelException- if impossible
-
isMappedToTable
-
getColumnObjects
Returns the list of columns (ColumnElements) to which this mapping field is mapped. This method should only be used by the runtime.- Returns:
- the columns mapped by this mapping field
-
getFieldNumber
public int getFieldNumber()Computes the field number of this field element.- Returns:
- the field number of this field
-
getConcurrencyGroups
Returns the array of concurrency groups to which this field belongs.- Returns:
- the concurrency groups in which this field participates
- See Also:
-
setProperty
public void setProperty(boolean flag, int propertyBit) -
getProperties
public int getProperties() -
getLogOnAccess
public boolean getLogOnAccess() -
setLogOnAccess
public void setLogOnAccess(boolean flag) -
getLogOnUpdate
public boolean getLogOnUpdate() -
setLogOnUpdate
public void setLogOnUpdate(boolean flag) -
getObserveOnAccess
public boolean getObserveOnAccess() -
setObserveOnAccess
public void setObserveOnAccess(boolean flag) -
getRecordOnUpdate
public boolean getRecordOnUpdate() -
setRecordOnUpdate
public void setRecordOnUpdate(boolean flag) -
getModifyBeforeImageOnUpdate
public boolean getModifyBeforeImageOnUpdate() -
setModifyBeforeImageOnUpdate
public void setModifyBeforeImageOnUpdate(boolean flag) -
getReferentialIntegrityUpdates
public boolean getReferentialIntegrityUpdates() -
setReferentialIntegrityUpdates
public void setReferentialIntegrityUpdates(boolean flag) -
getSendBeforeImage
public boolean getSendBeforeImage() -
setSendBeforeImage
public void setSendBeforeImage(boolean flag) -
getCloneDepth
public int getCloneDepth() -
setCloneDepth
public void setCloneDepth(int cloneDepth) -
stripSchemaName
protected void stripSchemaName()Boston to Pilsen conversion. This method converts the absolute column names to relative names.
-