2004.04.29


com.jdc.rdb.tbl.dto
Class ApplicationTableDTO

java.lang.Object
  |
  +--com.jdc.lang.Object
        |
        +--com.jdc.rdb.tbl.dto.DataTransferObject
              |
              +--com.jdc.rdb.tbl.dto.ApplicationTableDTO

public abstract class ApplicationTableDTO
extends DataTransferObject

ApplicationTableDTO represents a data tranfer object for a database application table. All data transfer object classes for application tables should subclass this class.

All application data transfer objects are assumed to contain the following fields:

Version:
1.0
Author:
Jay Damon
See Also:
ApplicationTableDAO

Field Summary
protected  DataTransferHelper data
          The data transfer helper object.
 
Fields inherited from class com.jdc.lang.Object
string
 
Constructor Summary
protected ApplicationTableDTO(int countryCode, int enterpriseCode, int applicationCode)
          Constructs a new ApplicationTableDTO object for the specified country code, enterprise code, and application code.
 
Method Summary
 void clearChanged()
          Resets the application data transfer object has changed or "dirty" flag.
 int getApplicationCode()
          Returns the application code for this database table row.
 int getCountryCode()
          Returns the country code for this database table row.
 int getEnterpriseCode()
          Returns the enterprise code for this database table row.
 boolean hasChanged()
          Returns true if at least one database table row value has changed.
 void setApplicationCode(int applicationCode)
          Sets the application code for this database table row.
 void setChanged(boolean hasChanged)
          Sets the application data transfer object has changed or "dirty" flag.
 void setChanged(int currentValue, int newValue)
          Sets the application data transfer object has changed or "dirty" flag based on the current and new int values.
 void setChanged(String currentValue, String newValue)
          Sets the application data transfer object has changed or "dirty" flag based on the current and new String values.
 void setCountryCode(int countryCode)
          Sets the country code for this database table row.
 void setEnterpriseCode(int enterpriseCode)
          Sets the enterprise code for this database table row.
 
Methods inherited from class com.jdc.rdb.tbl.dto.DataTransferObject
isFound, setFound
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

protected DataTransferHelper data
The data transfer helper object.

Constructor Detail

ApplicationTableDTO

protected ApplicationTableDTO(int countryCode,
                              int enterpriseCode,
                              int applicationCode)
Constructs a new ApplicationTableDTO object for the specified country code, enterprise code, and application code.

Method Detail

clearChanged

public void clearChanged()
Resets the application data transfer object has changed or "dirty" flag.


getApplicationCode

public int getApplicationCode()
Returns the application code for this database table row.

Returns:
The application code.

getCountryCode

public int getCountryCode()
Returns the country code for this database table row.

Returns:
The country code.

getEnterpriseCode

public int getEnterpriseCode()
Returns the enterprise code for this database table row.

Returns:
The enterprise code.

hasChanged

public boolean hasChanged()
Returns true if at least one database table row value has changed. Also known as the "dirty" flag.

Returns:
True if a database table row value has changed.
False if the database table row values have not changed.

setApplicationCode

public void setApplicationCode(int applicationCode)
Sets the application code for this database table row.


setChanged

public void setChanged(boolean hasChanged)
Sets the application data transfer object has changed or "dirty" flag. If has changed flag is currently true, the status will remain true. To clear the has changed flag, invoke the clearChanged method.


setChanged

public void setChanged(int currentValue,
                       int newValue)
Sets the application data transfer object has changed or "dirty" flag based on the current and new int values.


setChanged

public void setChanged(String currentValue,
                       String newValue)
Sets the application data transfer object has changed or "dirty" flag based on the current and new String values.


setCountryCode

public void setCountryCode(int countryCode)
Sets the country code for this database table row.


setEnterpriseCode

public void setEnterpriseCode(int enterpriseCode)
Sets the enterprise code for this database table row.


2004.04.29



Copyright © 2004 J. Damon & Co.; All Rights Reserved WorldWide.