Package es.bsc.dataclay.util
Class DataClayObjectMetaData
- java.lang.Object
-
- es.bsc.dataclay.util.DataClayObjectMetaData
-
public final class DataClayObjectMetaData extends Object
This class represents all metadata (tags) of an object.
-
-
Field Summary
Fields Modifier and Type Field Description protected static boolean
DEBUG_ENABLED
Indicates if debug is enabled.
-
Constructor Summary
Constructors Constructor Description DataClayObjectMetaData()
Empty constructor for deserialization.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
-
Method Summary
-
-
-
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 nonetheisReadOnly
- indicates if object is read onlynewmapOids
- 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 versiontherootLocation
- root location of the original object or null if this is originaltheoriginLocation
- origin location of the object in case of replicathereplicaLocations
- IDs of locations this replica-object was replicated to
-
-
Method Detail
-
getClassIDs
public Map<Integer,MetaClassID> getClassIDs()
- Returns:
- the classIDs
-
setClassIDs
public void setClassIDs(Map<Integer,MetaClassID> theclassIDs)
- Parameters:
theclassIDs
- the classIDs to set
-
getHints
public Map<Integer,ExecutionEnvironmentID> getHints()
- Returns:
- the hints
-
setHints
public void setHints(Map<Integer,ExecutionEnvironmentID> thehints)
- Parameters:
thehints
- the hints to set
-
setHint
public void setHint(Integer tag, ExecutionEnvironmentID hint)
- Parameters:
tag
- the tag to updatehint
- the new tag's hint
-
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
-
getHint
public ExecutionEnvironmentID getHint(Integer tag)
Get hint from tag- Parameters:
tag
- tag- Returns:
- hint
-
modifyOids
public void modifyOids(Map<ObjectID,ObjectID> oidsMapping)
Modify oids- Parameters:
oidsMapping
- Oids mapping
-
modifyHints
public void modifyHints(Map<ObjectID,ExecutionEnvironmentID> hintsMapping)
Modify hints- Parameters:
hintsMapping
- Hints of objects
-
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
-
-