Class AbstractPCData

  • All Implemented Interfaces:
    java.io.Serializable, PCData
    Direct Known Subclasses:
    PCDataImpl

    public abstract class AbstractPCData
    extends java.lang.Object
    implements PCData
    Abstract base class which implements core PCData behavior.
    Author:
    Patrick Linskey, Abe White
    See Also:
    Serialized Form
    • Field Detail

      • NULL

        public static final java.lang.Object NULL
    • Constructor Detail

      • AbstractPCData

        public AbstractPCData()
    • Method Detail

      • getLoaded

        public abstract java.util.BitSet getLoaded()
        Return the loaded field mask.
      • newEmbeddedPCData

        public abstract AbstractPCData newEmbeddedPCData​(OpenJPAStateManager sm)
        Create a new pcdata for holding the state of an embedded instance.
      • isLoaded

        public boolean isLoaded​(int field)
        Description copied from interface: PCData
        Whether the given field index has stored data.
        Specified by:
        isLoaded in interface PCData
      • toNestedField

        protected java.lang.Object toNestedField​(OpenJPAStateManager sm,
                                                 ValueMetaData vmd,
                                                 java.lang.Object data,
                                                 FetchConfiguration fetch,
                                                 java.lang.Object context)
        Transform the given data value to its field value. The data value may be a key, value, or element of a map or collection.
      • toNestedFields

        protected java.util.Collection toNestedFields​(OpenJPAStateManager sm,
                                                      ValueMetaData vmd,
                                                      java.util.Collection data,
                                                      FetchConfiguration fetch,
                                                      java.lang.Object context)
        Transform the given data value to its field value. The data value may be a key, value, or element of a map or collection.
      • toRelationField

        protected java.lang.Object toRelationField​(OpenJPAStateManager sm,
                                                   ValueMetaData vmd,
                                                   java.lang.Object data,
                                                   FetchConfiguration fetch,
                                                   java.lang.Object context)
        Transform the given data into a relation field value. Default implementation assumes the data is an oid.
      • toRelationFields

        protected java.lang.Object[] toRelationFields​(OpenJPAStateManager sm,
                                                      java.lang.Object data,
                                                      FetchConfiguration fetch)
        Transform the given data into relation field values. Default implementation assumes the data is an oid.
      • toData

        protected java.lang.Object toData​(FieldMetaData fmd,
                                          java.lang.Object val,
                                          StoreContext ctx)
        Transform the given field value to a data value for caching. Return NULL if unable to cache.
      • toNestedData

        protected java.lang.Object toNestedData​(ValueMetaData vmd,
                                                java.lang.Object val,
                                                StoreContext ctx)
        Transform the given nested value to a cachable value. Return NULL if the value cannot be cached.
      • toRelationData

        protected java.lang.Object toRelationData​(java.lang.Object val,
                                                  StoreContext ctx)
        Return the value to cache for the given object. Caches its oid by default.