gov.nih.nci.caarray.domain
Class AbstractCaArrayObject

java.lang.Object
  extended by gov.nih.nci.caarray.domain.AbstractCaArrayObject
All Implemented Interfaces:
com.fiveamsolutions.nci.commons.data.persistent.PersistentObject, java.io.Serializable
Direct Known Subclasses:
AbstractCaArrayEntity, AbstractDataColumn, AbstractDesignElement, ArrayDataType, ArrayDesignDetails, ArrayGroup, DataSet, HybridizationData, QuantitationType

public abstract class AbstractCaArrayObject
extends java.lang.Object
implements com.fiveamsolutions.nci.commons.data.persistent.PersistentObject

Base class for all persistent caArray domain objects.

See Also:
Serialized Form

Field Summary
static int DEFAULT_BATCH_SIZE
          Default hibernate batch size.
static int DEFAULT_STRING_COLUMN_SIZE
          The default column size for string columns in the db.
protected static int LARGE_TEXT_FIELD_LENGTH
          The column size for large string columns in the db.
 
Constructor Summary
AbstractCaArrayObject()
           
 
Method Summary
 boolean equals(java.lang.Object o)
          The default comparison uses the id.
 java.lang.String getCaBigId()
           
 java.lang.Long getId()
          Returns the id.
 java.util.Set<gov.nih.nci.caarray.security.SecurityPolicy> getPostLoadSecurityPolicies(gov.nih.nci.security.authorization.domainobjects.User currentUser)
          Return the set of security policies that should be applied to this object at hibernate load time.
 java.util.Set<gov.nih.nci.caarray.security.SecurityPolicy> getRemoteApiSecurityPolicies(gov.nih.nci.security.authorization.domainobjects.User currentUser)
          Return the set of security policies that should be applied to this object prior to it being returned as part of a return value for a remote API call.
 int hashCode()
          Default hashCode goes off of id.
 void setCaBigId(java.lang.String gridIdentifier)
           
 void setId(java.lang.Long id)
          Deprecated. should only be used by castor and hibernate
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_STRING_COLUMN_SIZE

public static final int DEFAULT_STRING_COLUMN_SIZE
The default column size for string columns in the db.

See Also:
Constant Field Values

LARGE_TEXT_FIELD_LENGTH

protected static final int LARGE_TEXT_FIELD_LENGTH
The column size for large string columns in the db.

See Also:
Constant Field Values

DEFAULT_BATCH_SIZE

public static final int DEFAULT_BATCH_SIZE
Default hibernate batch size.

See Also:
Constant Field Values
Constructor Detail

AbstractCaArrayObject

public AbstractCaArrayObject()
Method Detail

getId

@AttributePolicy(allow="Browse")
public java.lang.Long getId()
Returns the id.

Specified by:
getId in interface com.fiveamsolutions.nci.commons.data.persistent.PersistentObject
Returns:
the id

setId

@Deprecated
public void setId(java.lang.Long id)
Deprecated. should only be used by castor and hibernate

Sets the id.

Parameters:
id - the id to set

getPostLoadSecurityPolicies

public java.util.Set<gov.nih.nci.caarray.security.SecurityPolicy> getPostLoadSecurityPolicies(gov.nih.nci.security.authorization.domainobjects.User currentUser)
Return the set of security policies that should be applied to this object at hibernate load time. These policies will be applied as port of a hibernate post-load event listener, so that by the time a query that results in the load of this object is finished and returns to the program, these policies will have been applied. Note that because the policies will be applied while hibernate is in the middle of loading the objects from the database, unexpected behavior may occur. For example, asssociated objects and collections may not yet be loaded. The security policies must be designed carefully in awareness of this behavior.

Parameters:
currentUser - the current user.
Returns:
the set of policies to apply to this object, given the current user.

getRemoteApiSecurityPolicies

public java.util.Set<gov.nih.nci.caarray.security.SecurityPolicy> getRemoteApiSecurityPolicies(gov.nih.nci.security.authorization.domainobjects.User currentUser)
Return the set of security policies that should be applied to this object prior to it being returned as part of a return value for a remote API call.

Parameters:
currentUser - the current user.
Returns:
the set of policies to apply to this object, given the current user.

equals

public boolean equals(java.lang.Object o)
The default comparison uses the id.

Overrides:
equals in class java.lang.Object
Parameters:
o - other object
Returns:
equal or not

hashCode

public int hashCode()
Default hashCode goes off of id.

Overrides:
hashCode in class java.lang.Object
Returns:
hashCode

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

getCaBigId

public java.lang.String getCaBigId()
Returns:
the gridIdentifier

setCaBigId

public void setCaBigId(java.lang.String gridIdentifier)
Parameters:
gridIdentifier - the gridIdentifier to set