Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.common.data.ejb
Class Data  view Data download Data.java

java.lang.Object
  extended bycom.flexstor.common.data.ejb.Data
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
SettingData

public class Data
extends java.lang.Object
implements java.io.Serializable

This class is used by all FLEXSTOR.db serializable data objects. It allows for a common superclass.
It contains variables for setting states for objects (New, Updated, Deleted, Unchanged); this states are mainly used in the Admin Tool.


Field Summary
static int DELETE
           
static int DELETED
           
protected  boolean derived
          This property determine whether the data object is derived property for the user or not.
protected  java.util.Hashtable htModifiedStates
          This Hashtable holds the modified state (true/false) for data objects that a subclass of Data contains.
protected  java.util.Hashtable htOptions
           
static int MODIFY
           
protected  long modTime
           
static int NEW_ENTRY
           
private  boolean persistState
          Indicates if the data object is received from server or created on the client side.
protected  int presentState
          The present state of the object.
protected  int prevState
          The previous state of the object.
static int UNCHANGED
           
static int UPDATED
           
static int WARN_BEFORE_DELETE
           
 
Constructor Summary
Data()
          Default constructor for the Data class
 
Method Summary
protected  boolean assertEquals(java.lang.String instanceString, java.lang.String parameterString)
          Checks whether two strings have equal values.
 boolean changed()
          Checks if the object has undergone any change in its state.
protected  void fillCloneInfo(Data clone)
           
 java.util.Date getDateModTime()
           
 long getModTime()
           
 int getPresentState()
           
 int getPreviousState()
           
 void initializeState()
           
 boolean isDeleted()
          Checks if the object is marked as deleted.
 boolean isDerived()
           
 boolean isModified()
           
 boolean isModified(java.lang.Integer nDataType)
           
 boolean isObjectPersist()
           
 boolean isOptionAllowed(int option)
           
 void resetModifiedStates()
           
 void rollBackState()
          Rollbacks the state of the derived object.
 void setDeleted(boolean bool)
          Marks the object as deleted.
 void setDerived(boolean dir)
           
 void setModifiedState(java.lang.Integer nDataType, java.lang.Boolean bValue)
           
 void setModTime(java.util.Date date)
           
 void setModTime(long modTime)
           
 void setNewEntry(boolean bool)
          Marks an object as 'New Object'.
 void setOption(int option, boolean value)
           
 void setPerisistState(boolean bool)
           
 void setPreviousState(int pState)
           
 void setState(int newState)
          Sets the new state for the object.
 void setUpdated(boolean bool)
          Marks the derived object as updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODIFY

public static final int MODIFY
See Also:
Constant Field Values

DELETE

public static final int DELETE
See Also:
Constant Field Values

WARN_BEFORE_DELETE

public static final int WARN_BEFORE_DELETE
See Also:
Constant Field Values

UPDATED

public static final int UPDATED
See Also:
Constant Field Values

NEW_ENTRY

public static final int NEW_ENTRY
See Also:
Constant Field Values

DELETED

public static final int DELETED
See Also:
Constant Field Values

UNCHANGED

public static final int UNCHANGED
See Also:
Constant Field Values

modTime

protected long modTime

htOptions

protected java.util.Hashtable htOptions

htModifiedStates

protected java.util.Hashtable htModifiedStates
This Hashtable holds the modified state (true/false) for data objects that a subclass of Data contains. For instance, for DisguiseData, this Hashtable is populated with the modified state of the where clause and asset privileges.


persistState

private boolean persistState
Indicates if the data object is received from server or created on the client side.


presentState

protected int presentState
The present state of the object.


prevState

protected int prevState
The previous state of the object.


derived

protected boolean derived
This property determine whether the data object is derived property for the user or not. This is basically used for users. For groups.. no property is derived. If this is true the property does not belong to the user, but derived from the groups it belong.

Since:
3.0
Constructor Detail

Data

public Data()
Default constructor for the Data class

Method Detail

getModTime

public long getModTime()

getDateModTime

public java.util.Date getDateModTime()

setModTime

public void setModTime(long modTime)

setModTime

public void setModTime(java.util.Date date)

isOptionAllowed

public boolean isOptionAllowed(int option)

setOption

public void setOption(int option,
                      boolean value)
               throws java.lang.Exception

assertEquals

protected boolean assertEquals(java.lang.String instanceString,
                               java.lang.String parameterString)
Checks whether two strings have equal values.


getPresentState

public int getPresentState()

setPreviousState

public void setPreviousState(int pState)

getPreviousState

public int getPreviousState()

setState

public void setState(int newState)
Sets the new state for the object.


isDeleted

public boolean isDeleted()
Checks if the object is marked as deleted.

Since:
3.0

setDeleted

public void setDeleted(boolean bool)
Marks the object as deleted.

Since:
3.0

setUpdated

public void setUpdated(boolean bool)
Marks the derived object as updated.

Since:
3.0

setNewEntry

public void setNewEntry(boolean bool)
Marks an object as 'New Object'.

Since:
3.0

rollBackState

public void rollBackState()
Rollbacks the state of the derived object. It makes the present state of the object and the previous state of the object same.

Since:
3.0

changed

public boolean changed()
Checks if the object has undergone any change in its state.


initializeState

public void initializeState()

setPerisistState

public void setPerisistState(boolean bool)

isObjectPersist

public boolean isObjectPersist()

isDerived

public boolean isDerived()

setDerived

public void setDerived(boolean dir)

setModifiedState

public void setModifiedState(java.lang.Integer nDataType,
                             java.lang.Boolean bValue)

resetModifiedStates

public void resetModifiedStates()

isModified

public boolean isModified(java.lang.Integer nDataType)

isModified

public boolean isModified()

fillCloneInfo

protected void fillCloneInfo(Data clone)