Class 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 Details

  • 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

      public MappingFieldElementImpl(String name, MappingClassElement declaringClass)
      Create new MappingFieldElementImpl with the corresponding name and declaring class.
      Parameters:
      name - the name of the element
      declaringClass - the class to attach to
  • Method Details

    • isReadOnly

      public boolean isReadOnly()
      Determines whether this field element is read only or not.
      Specified by:
      isReadOnly in interface MappingFieldElement
      Returns:
      true if the field is read only, false otherwise
    • setReadOnly

      public void setReadOnly(boolean flag) throws ModelException
      Set whether this field element is read only or not.
      Specified by:
      setReadOnly in interface MappingFieldElement
      Parameters:
      flag - - if true, 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:
      isInConcurrencyCheck in interface MappingFieldElement
      Returns:
      true if the field is in a concurrency check, false otherwise
    • setInConcurrencyCheck

      public void setInConcurrencyCheck(boolean flag) throws ModelException
      Set whether this field element is in a concurrency check or not.
      Specified by:
      setInConcurrencyCheck in interface MappingFieldElement
      Parameters:
      flag - - if true, 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:
      isVersion in interface MappingFieldElement
      Returns:
      true if the field is a version field, false otherwise
    • setVersion

      public void setVersion(boolean flag) throws ModelException
      Set whether this field element is a version field or not.
      Specified by:
      setVersion in interface MappingFieldElement
      Parameters:
      flag - - if true, 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:
      getFetchGroup in interface MappingFieldElement
      Returns:
      the fetch group, one of MappingFieldElement.GROUP_DEFAULT, MappingFieldElement.GROUP_NONE, or anything less than or equal to MappingFieldElement.GROUP_INDEPENDENT
    • setFetchGroup

      public void setFetchGroup(int group) throws ModelException
      Set the fetch group of this field element.
      Specified by:
      setFetchGroup in interface MappingFieldElement
      Parameters:
      group - - an integer indicating the fetch group, one of: MappingFieldElement.GROUP_DEFAULT, MappingFieldElement.GROUP_NONE, or anything less than or equal to MappingFieldElement.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 to MappingFieldElement.GROUP_INDEPENDENT
    • getColumns

      public ArrayList getColumns()
      Returns the list of column names to which this mapping field is mapped.
      Specified by:
      getColumns in interface MappingFieldElement
      Returns:
      the names of the columns mapped by this mapping field
    • addColumn

      public void addColumn(org.netbeans.modules.dbschema.DBMemberElement column) throws ModelException
      Adds a column to the list of columns mapped by this mapping field.
      Specified by:
      addColumn in interface MappingFieldElement
      Parameters:
      column - column element to be added to the mapping
      Throws:
      ModelException - if impossible
    • removeColumn

      public void removeColumn(String columnName) throws ModelException
      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:
      removeColumn in interface MappingFieldElement
      Parameters:
      columnName - the relative name of the column to be removed from the mapping
      Throws:
      ModelException - if impossible
    • isMappedToTable

      protected boolean isMappedToTable(MappingTableElement table)
    • getColumnObjects

      public ArrayList 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

      public ConcurrencyGroupElement[] 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.