edu.vt.middleware.ed
Class AbstractDataObject

java.lang.Object
  extended by edu.vt.middleware.ed.AbstractDataObject
All Implemented Interfaces:
DataObject, Persistable, Serializable, Comparable<DataObject>
Direct Known Subclasses:
AbstractMutableDataObject, AffiliationData, ArchivedPerson, EmployeeDepartment, StudentMajor, SuppressedAttribute

public abstract class AbstractDataObject
extends Object
implements DataObject, Serializable, Comparable<DataObject>, Persistable

Base implementation of a DataObject.

Version:
$Revision: 6950 $
Author:
Daniel Fisher
See Also:
Serialized Form

Field Summary
protected  String createdBy
          created by
protected  Calendar creationDate
          creation date
private static long serialVersionUID
          Serialization marker
protected  Long uid
          primary key
 
Constructor Summary
AbstractDataObject()
           
 
Method Summary
 int compareTo(DataObject other)
          
 String getCreatedBy()
          This returns the created by.
 Calendar getCreationDate()
          This returns the creation date.
 Long getUid()
          This returns the uid.
 void setCreatedBy(String s)
          This sets the created by.
 void setCreationDate(Calendar c)
          This sets the creation date.
 void setUid(Long l)
          This sets the uid.
 String toString()
          Provides a descriptive string representation of this instance.
 void validateProperties()
          Validates all persisted properties on an entity and ensures that they meet the criteria required for database persistence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serialization marker

See Also:
Constant Field Values

uid

protected Long uid
primary key


creationDate

protected Calendar creationDate
creation date


createdBy

protected String createdBy
created by

Constructor Detail

AbstractDataObject

public AbstractDataObject()
Method Detail

getUid

public Long getUid()
This returns the uid.

Specified by:
getUid in interface DataObject
Returns:
Long - uid

setUid

public void setUid(Long l)
This sets the uid.

Specified by:
setUid in interface DataObject
Parameters:
l - Long to set

getCreationDate

public Calendar getCreationDate()
This returns the creation date.

Specified by:
getCreationDate in interface DataObject
Returns:
Calendar

setCreationDate

public void setCreationDate(Calendar c)
This sets the creation date.

Specified by:
setCreationDate in interface DataObject
Parameters:
c - Calendar

getCreatedBy

public String getCreatedBy()
This returns the created by.

Specified by:
getCreatedBy in interface DataObject
Returns:
String

setCreatedBy

public void setCreatedBy(String s)
This sets the created by.

Specified by:
setCreatedBy in interface DataObject
Parameters:
s - String

compareTo

public int compareTo(DataObject other)

Specified by:
compareTo in interface Comparable<DataObject>

validateProperties

public void validateProperties()
                        throws EntityValidationException
Validates all persisted properties on an entity and ensures that they meet the criteria required for database persistence. Implementers should do at least constraint checks (e.g. NOT NULL) and character column length checks.

Specified by:
validateProperties in interface Persistable
Throws:
EntityValidationException - When input validation fails. The exception * should be constructed by implementers such that the fields that failed validation are available via EntityValidationException.getProblems().

toString

public String toString()
Provides a descriptive string representation of this instance.

Overrides:
toString in class Object
Returns:
String of the form $Classname::uid=$uid.


Copyright © 2008 Virginia Tech. All Rights Reserved.