Class DataClayObjectMetaData


  • public final class DataClayObjectMetaData
    extends Object
    This class represents all metadata (tags) of an object.
    • Field Detail

      • DEBUG_ENABLED

        protected static final boolean DEBUG_ENABLED
        Indicates if debug is enabled.
    • Constructor Detail

      • DataClayObjectMetaData

        public DataClayObjectMetaData()
        Empty constructor for deserialization.
      • DataClayObjectMetaData

        public DataClayObjectMetaData​(String thealias,
                                      boolean theisReadOnly,
                                      Map<Integer,​ObjectID> newmapOids,
                                      Map<Integer,​MetaClassID> newmapClassIDs,
                                      Map<Integer,​ExecutionEnvironmentID> newmapHints,
                                      int newnumRefs,
                                      ObjectID theoriginalObjectID,
                                      ExecutionEnvironmentID therootLocation,
                                      ExecutionEnvironmentID theoriginLocation,
                                      Set<ExecutionEnvironmentID> thereplicaLocations)
        Constructor
        Parameters:
        thealias - Alias of the object or null if none
        theisReadOnly - indicates if object is read only
        newmapOids - Map tag to OID.
        newmapClassIDs - Map tag to class id.
        newmapHints - Map tag to hint id.
        newnumRefs - Number of references pointing to object.
        theoriginalObjectID - Original object id in case of new version
        therootLocation - root location of the original object or null if this is original
        theoriginLocation - origin location of the object in case of replica
        thereplicaLocations - IDs of locations this replica-object was replicated to
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • setOids

        public void setOids​(Map<Integer,​ObjectID> theoids)
        Parameters:
        theoids - the oids to set
      • setClassIDs

        public void setClassIDs​(Map<Integer,​MetaClassID> theclassIDs)
        Parameters:
        theclassIDs - the classIDs to set
      • getObjectID

        public ObjectID getObjectID​(Integer tag)
        Get object id from tag
        Parameters:
        tag - tag
        Returns:
        Object id
      • getMetaClassID

        public MetaClassID getMetaClassID​(Integer tag)
        Get class id from tag
        Parameters:
        tag - tag
        Returns:
        Class id
      • modifyOids

        public void modifyOids​(Map<ObjectID,​ObjectID> oidsMapping)
        Modify oids
        Parameters:
        oidsMapping - Oids mapping
      • getNumRefs

        public int getNumRefs()
        Returns:
        the numRefs
      • setNumRefs

        public void setNumRefs​(int thenumRefs)
        Parameters:
        thenumRefs - the numRefs to set
      • getRootLocation

        public ExecutionEnvironmentID getRootLocation()
        Returns:
        root location of the object or null if current is root
      • setRootLocation

        public void setRootLocation​(ExecutionEnvironmentID rootLocation)
        Set root location of the object
        Parameters:
        rootLocation - root location to set
      • getOriginLocation

        public ExecutionEnvironmentID getOriginLocation()
        Returns:
        origin location of the object or null if current is origin
      • setOriginLocation

        public void setOriginLocation​(ExecutionEnvironmentID originLocation)
        Set origin location of the object
        Parameters:
        originLocation - origin location to set
      • getReplicaLocations

        public Set<ExecutionEnvironmentID> getReplicaLocations()
        Get all replica locations
        Returns:
        Replica locations
      • setReplicaLocations

        public void setReplicaLocations​(Set<ExecutionEnvironmentID> replicaLocations)
        Set replica locations
        Parameters:
        replicaLocations - replica locations to set
      • getAlias

        public String getAlias()
        Get alias
        Returns:
        the alias of the object
      • setAlias

        public void setAlias​(String alias)
        Set the alias of the object
        Parameters:
        alias - the alias of the object
      • getOriginalObjectID

        public ObjectID getOriginalObjectID()
        Get original object ID if versioned
        Returns:
        Original object ID
      • setOriginalObjectID

        public void setOriginalObjectID​(ObjectID origObjectID)
        Set original object ID
        Parameters:
        origObjectID - original object ID to set
      • getIsReadOnly

        public boolean getIsReadOnly()
        Get if object is read only
        Returns:
        Boolean indicating if object is read only or not
      • setIsReadOnly

        public void setIsReadOnly​(boolean newisReadOnly)
        set if object is read only
        Parameters:
        newisReadOnly - Boolean indicating if object is read only or not