Direct Known Subclasses:
IdAccessor, TransformationAccessor, VersionAccessor

public class BasicAccessor extends DirectAccessor
INTERNAL: A relational accessor. A Basic annotation may or may not be present on the accessible object. Key notes: - any metadata mapped from XML to this class must be compared in the equals method. - any metadata mapped from XML to this class must be handled in the merge method. (merging is done at the accessor/mapping level) - any metadata mapped from XML to this class must be initialized in the initXMLObject method. - methods should be preserved in alphabetical order.
Since:
TopLink EJB 3.0 Reference Implementation
  • Constructor Details

  • Method Details

    • equals

      public boolean equals(Object objectToCompare)
      INTERNAL:
      Overrides:
      equals in class DirectAccessor
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class DirectAccessor
    • getColumn

      public ColumnMetadata getColumn()
      INTERNAL: Used for OX mapping.
    • getColumn

      protected ColumnMetadata getColumn(String loggingCtx)
      INTERNAL: Return the column from xml if there is one, otherwise look for an annotation.
      Overrides:
      getColumn in class MappingAccessor
      See Also:
    • getDefaultFetchType

      public String getDefaultFetchType()
      INTERNAL:
      Specified by:
      getDefaultFetchType in class DirectAccessor
    • getDatabaseField

      protected DatabaseField getDatabaseField()
      INTERNAL:
    • getGeneratedValue

      public GeneratedValueMetadata getGeneratedValue()
      INTERNAL: Used for OX mapping.
    • getMutable

      public Boolean getMutable()
      INTERNAL: Used for OX mapping.
    • getReturnInsert

      public ReturnInsertMetadata getReturnInsert()
      INTERNAL: Used for OX mapping.
    • getReturnUpdate

      public Boolean getReturnUpdate()
      INTERNAL: Used for OX mapping.
    • getSequenceGenerator

      public SequenceGeneratorMetadata getSequenceGenerator()
      INTERNAL: Used for OX mapping.
    • getTableGenerator

      public TableGeneratorMetadata getTableGenerator()
      INTERNAL: Used for OX mapping.
    • getUuidGenerator

      public UuidGeneratorMetadata getUuidGenerator()
      INTERNAL: Used for OX mapping.
    • initXMLObject

      public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)
      INTERNAL:
      Overrides:
      initXMLObject in class DirectAccessor
    • isBasic

      public boolean isBasic()
      INTERNAL: Return true if this accessor represents a basic mapping.
      Overrides:
      isBasic in class MappingAccessor
    • isCollectionClass

      protected boolean isCollectionClass(MetadataClass cls)
      INTERNAL: Method to return whether a class is a collection or not.
    • isMapClass

      protected boolean isMapClass(MetadataClass cls)
      INTERNAL: Method to return whether a class is a map or not.
    • isReturnUpdate

      public Boolean isReturnUpdate()
      INTERNAL: USed for OX mapping
    • process

      public void process()
      INTERNAL: Process a basic accessor.
      Specified by:
      process in class MetadataAccessor
    • processEnumerated

      protected void processEnumerated(EnumeratedMetadata enumerated, DatabaseMapping mapping, MetadataClass referenceClass, boolean isForMapKey)
      INTERNAL: Process an Enumerated annotation. The method may still be called if no Enumerated annotation has been specified but the accessor's reference class is a valid enumerated type.
      Overrides:
      processEnumerated in class MappingAccessor
    • processGeneratedValue

      protected void processGeneratedValue()
      INTERNAL: Process the generated value metadata.
    • processIndex

      protected void processIndex()
      INTERNAL: Process index information for the given mapping.
    • processCacheIndex

      protected void processCacheIndex()
      INTERNAL: Process cache index.
    • processLob

      protected void processLob(LobMetadata lob, DatabaseMapping mapping, MetadataClass referenceClass, boolean isForMapKey)
      INTERNAL: Process a Lob metadata. The lob must be specified to process and create a lob type mapping.
      Overrides:
      processLob in class MappingAccessor
    • processReturnInsert

      protected void processReturnInsert()
      INTERNAL: Process a ReturnInsert annotation.
      Overrides:
      processReturnInsert in class MappingAccessor
      See Also:
    • processReturnUpdate

      protected void processReturnUpdate()
      INTERNAL: Process a return update setting.
      Overrides:
      processReturnUpdate in class MappingAccessor
      See Also:
    • getIndex

      public IndexMetadata getIndex()
      INTERNAL: Used for OX mapping.
    • setIndex

      public void setIndex(IndexMetadata index)
      INTERNAL: Used for OX mapping.
    • getCacheIndex

      public CacheIndexMetadata getCacheIndex()
      INTERNAL: Used for OX mapping.
    • setCacheIndex

      public void setCacheIndex(CacheIndexMetadata index)
      INTERNAL: Used for OX mapping.
    • setColumn

      public void setColumn(ColumnMetadata column)
      INTERNAL: Used for OX mapping.
    • setGeneratedValue

      public void setGeneratedValue(GeneratedValueMetadata value)
      INTERNAL: Used for OX mapping.
    • setMutable

      public void setMutable(Boolean mutable)
      INTERNAL: Used for OX mapping.
    • setReturnInsert

      public void setReturnInsert(ReturnInsertMetadata returnInsert)
      INTERNAL: Used for OX mapping.
    • setReturnUpdate

      public void setReturnUpdate(Boolean returnUpdate)
      INTERNAL: Used for OX mapping.
    • setSequenceGenerator

      public void setSequenceGenerator(SequenceGeneratorMetadata sequenceGenerator)
      INTERNAL: Used for OX mapping.
    • setTableGenerator

      public void setTableGenerator(TableGeneratorMetadata tableGenerator)
      INTERNAL: Used for OX mapping.
    • setUuidGenerator

      public void setUuidGenerator(UuidGeneratorMetadata uuidGenerator)
      INTERNAL: Used for OX mapping.