be.SIRAPRISE.client.jsba
Class DBObjectTemplate

java.lang.Object
  extended by be.SIRAPRISE.client.jsba.DBObjectTemplate
All Implemented Interfaces:
DBObject

public abstract class DBObjectTemplate
extends java.lang.Object
implements DBObject

Class provided for purposes of documenting the methods involved in the SIRA_PRISE/Java bridge.

Author:
Erwin Smout

Constructor Summary
DBObjectTemplate()
          The public no-arg constructor is required in any (class that implements) DBObject.
DBObjectTemplate(int attribute1, java.lang.String attribute2)
          Other constructors may exist to serve the application programs
 
Method Summary
 int getAttribute1()
          Gets some attribute of this class
 java.lang.String getAttribute2()
          Gets some other attribute of this class
 java.lang.String getRelvar1Attribute1()
          Gets the value of some attribute of this class for use in the Java-to-SIRA_PRISE part of the bridge.
 java.lang.String getRelvar1Attribute2()
          Gets the value of some other attribute of this class for use in the Java-to-SIRA_PRISE part of the bridge.
 java.lang.String getRelvar2Attribute1()
          Gets the value of some attribute of this class for use in the Java-to-SIRA_PRISE part of the bridge.
 void setAttribute1(int attribute1)
          Sets some attribute of this class
 void setAttribute1FromDB(java.lang.String attribute1)
          Sets some attribute of this class, given a SIRA_PRISE string representation of the value to set.
 void setAttribute2(java.lang.String attribute2)
          Sets some other attribute of this class
 void setAttribute2FromDB(java.lang.String attribute2)
          Sets some other attribute of this class, given a SIRA_PRISE string representation of the value to set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBObjectTemplate

public DBObjectTemplate()
The public no-arg constructor is required in any (class that implements) DBObject.


DBObjectTemplate

public DBObjectTemplate(int attribute1,
                        java.lang.String attribute2)
Other constructors may exist to serve the application programs

Parameters:
attribute1 - some attribute of this class
attribute2 - some other attribute of this class
Method Detail

getAttribute1

public final int getAttribute1()
Gets some attribute of this class

Returns:
some attribute of this class

getAttribute2

public final java.lang.String getAttribute2()
Gets some other attribute of this class

Returns:
some other attribute of this class

getRelvar1Attribute1

public final java.lang.String getRelvar1Attribute1()
Gets the value of some attribute of this class for use in the Java-to-SIRA_PRISE part of the bridge.

Returns:
some attribute of this class. The return type of the getter methods that form the java-to-SIRA_PRISE part of the bridge must always be java.lang.String.

getRelvar1Attribute2

public final java.lang.String getRelvar1Attribute2()
Gets the value of some other attribute of this class for use in the Java-to-SIRA_PRISE part of the bridge. Note the call to BracketParser.meta(). This call is needed in the case that the value of the attribute can itself contain characters that are part of the SIRA_PRISE language, notably '(', ')' and '\' characters.

Returns:
some other attribute of this class

getRelvar2Attribute1

public final java.lang.String getRelvar2Attribute1()
Gets the value of some attribute of this class for use in the Java-to-SIRA_PRISE part of the bridge.

Returns:
some attribute of this class.

setAttribute1

public final void setAttribute1(int attribute1)
Sets some attribute of this class

Parameters:
attribute1 - some attribute of this class

setAttribute1FromDB

public final void setAttribute1FromDB(java.lang.String attribute1)
Sets some attribute of this class, given a SIRA_PRISE string representation of the value to set.

Parameters:
attribute1 - The SIRA_PRISE string representation of a value for some attribute of this class

setAttribute2

public final void setAttribute2(java.lang.String attribute2)
Sets some other attribute of this class

Parameters:
attribute2 - some other attribute of this class

setAttribute2FromDB

public final void setAttribute2FromDB(java.lang.String attribute2)
Sets some other attribute of this class, given a SIRA_PRISE string representation of the value to set.

Parameters:
attribute2 - The SIRA_PRISE string representation of a value for some other attribute of this class. Note in particular the call to BracketParser.unMeta(). This is because the String values that are passed to these setter methods are always in 'escaped' format, i.e. if one of the characters '(', ')' or '\' is part of the actual value of the attribute, then any appearance of these characters is represented by the character sequences '\(', '\)' or '\\' respectively (note that in a java source, the latter is actually written as four consecutive backslashes, because java itself also 'escapes' backslash characters). This allows in particular to correctly treat values that contain opening and closing parentheses to denote component values of the value. E.g. a date value could be passed to this setter method as the String "D(31)M(12)Y(1999)". Thus, string values that represent filenames or directory names can also be dealt with appropriately : the set...FromDB() method will be invoked with a String value of, e.g. "directory\\filename", and the "regular" setter method available to the application could be invoked with a string value of "directory\filename", as the application is likely to want to have it.