Constructor index | Method index | Bottom


Class: symantec.itools.db.pro.RelationView

Purpose Represents a RelationView.
Hierarchy java.lang.Object
|
+----symantec.itools.db.pro.RelationView
Syntax public class RelationView
extends Object
implements DataAccess
Description RelationView implements interface symantec.itools.db.pro.DataAccess. RelationView handles all data manipulation with a dbANYWHERE Server. It lets you bind an object to a projection.

A RelationView is a reference to Record object in MultiView's view. You can have multiple independent RelationView for one view that is in a MultiView.

See also AutoDetail
DataAccess
MultiView


Constructor Index

Constructor index | Method index | Top | Bottom


RelationView
oCreates a RelationView object.
oSyntaxes:
RelationView(Request)
RelationView(AutoDetail)


Method Index

Constructor index | Top | Bottom


asciiStreamtoString(InputStream)
oReturns a String from a java.io.InputStream object that is in ASCII format.
binaryArraytoString(byte)
oReturns a String from an array of bytes.
binaryStreamtoString(InputStream, int)
oReturns a String from a java.io.InputStream object that is in binary format.
bindCurrentRecord(RecordLink)
oBinds a RecordLink object to a RelationView's current record.
bindList
oBinds a Java object to a RelationView's projection.
oSyntaxes:
bindList(ConnectionInfo, String, ListLink, Vector)
bindList(ConnectionInfo, String, ListLink, int[ ])
bindProj(int, ProjLink)
oBinds a Java object to a RelationView's projection.
closeMultiView( )
oCloses a MultiView.
deleteRecord( )
oMarks a record for deletion.
doesProjExist(String)
oIndicates whether or not a specific projection exists.
enableBindingNotify
oTurns on or off the notification of ProjLink, ListLink, and RecordLink objects.
oSyntaxes:
enableBindingNotify(boolean)
enableBindingNotify(boolean, boolean)
enableDetailSQL(boolean)
oTurns on or off the generation of SQL statements for the RelationView's detail views.
findProjByName(String)
oReturns a projection's ID.
first( )
oSets a RelationView's current record to the view's first record.
getAsciiStream
oReturns a Projection value in a java.io.InputStream object in ASCII format.
oSyntaxes:
getAsciiStream(int)
getAsciiStream(String)
getAutoDetail
oReturns an AutoDetail object.
oSyntaxes:
getAutoDetail( )
getAutoDetail(String)
getAutoDetail(ConnectionInfo, String, Properties, Properties)
getBignum
oReturns a Projection value as a symjava.lang.Bignum object.
oSyntaxes:
getBignum(int, int)
getBignum(String, int)
getBinaryStream
oReturns a Projection value in a java.io.InputStream object in binary format.
oSyntaxes:
getBinaryStream(int)
getBinaryStream(String)
getBoolean
oReturns a Projection value as a boolean.
oSyntaxes:
getBoolean(int)
getBoolean(String)
getByte
oReturns a Projection value as a byte.
oSyntaxes:
getByte(int)
getByte(String)
getBytes
oReturns a Projection value as an array of bytes.
oSyntaxes:
getBytes(int)
getBytes(String)
getCurrentRecordNumber( )
oReturns the record number for a RelationView's current record as an int.
getCurrentRecordNumberString( )
oReturns the record number for a RelationView's current record as a String.
getCurrentRecordState( )
oReturns the state of a RelationView's current record.
getDate
oReturns a Projection value as a symjava.sql.Date object.
oSyntaxes:
getDate(int)
getDate(String)
getDouble
oReturns Projection value as a double.
oSyntaxes:
getDouble(int)
getDouble(String)
getFloat
oReturns Projection value as a float.
oSyntaxes:
getFloat(int)
getFloat(String)
getInt
oReturns a Projection value as an int.
oSyntaxes:
getInt(int)
getInt(String)
getLong
oReturns a Projection value as a long.
oSyntaxes:
getLong(int)
getLong(String)
getMetaData( )
oReturns a RelationViewMetaData object.
getMultiView( )
oReturns a MultiView.
getName( )
oReturns a RelationView's name.
getNewRecord( )
oCreates a new record.
getParentRelationView( )
oReturns the parent RelationView of the current RelationView (if there is one).
getRecord( )
oReturns a record.
getShort
oReturns a Projection value as a short.
oSyntaxes:
getShort(int)
getShort(String)
getString
oReturns a Projection value as a String.
oSyntaxes:
getString(int)
getString(String)
getStringValue
oReturns a Projection value as a String in ASCII format.
oSyntaxes:
getStringValue(int)
getStringValue(int, int)
getStringValue(int, boolean)
getStringValue(int, int, boolean)
getStringValue(int, String, int)
getStringValue(int, int, int)
getStringValue(int, String, int, boolean)
getStringValue(int, int, int, boolean)
getTime
oReturns a Projection value as a symjava.sql.Time object.
oSyntaxes:
getTime(int)
getTime(String)
getTimestamp
oReturns a Projection value as a symjava.sql.Timestamp object.
oSyntaxes:
getTimestamp(int)
getTimestamp(String)
getUnicodeStream
oReturns a Projection value in a java.io.InputStream object in Unicode format.
oSyntaxes:
getUnicodeStream(int)
getUnicodeStream(String)
goTo
oSets a RelationView's current record to the record with the specified record number.
oSyntaxes:
goTo(int)
goTo(String)
isBindingNotifyEnabled( )
oIndicates whether or not binding notifications are enabled.
isCurrentRecordReadable( )
oIndicates whether or not a record can be read.
isCurrentRecordWritable( )
oIndicates whether or not a record can be written to.
isNull
oIndicates whether or not a Projection value is defined.
oSyntaxes:
isNull(int)
isNull(String)
next( )
oSets a RelationView's current record to the next record.
prev( )
oSets a RelationView's current record to the previous record.
processEmptyStringData(String, RelationView, int, int, int)
oProcesses an empty or NULL String.
restartMultiView( )
oRestarts a MultiView.
restartMultiView( String newWhereClause)
oRestarts a MultiView, modifying the root RelationView's SQL select statement.
rewind( )
oRewinds a RelationView.
saveMultiView( )
oSave a MultiView's changes.
setAsciiStream
oSets a Projection value to a java.io.InputStream object in ASCII format.
oSyntaxes:
setAsciiStream(int, InputStream, int)
setAsciiStream(String, InputStream, int)
setBignum
oSets a Projection value to a symjava.lang.Bignum value.
oSyntaxes:
setBignum(int, Bignum)
setBignum(String, Bignum)
setBinaryStream
oSets a Projection value to a java.io.InputStream object in binary format.
oSyntaxes:
setBinaryStream(int, InputStream, int)
setBinaryStream(String, InputStream, int)
setBoolean
oSets a Projection value to a boolean value.
oSyntaxes:
setBoolean(int, boolean)
setBoolean(String, boolean)
setByte
oSets a Projection value to a byte value.
oSyntaxes:
setByte(int, byte)
setByte(String, byte)
setBytes
oSets a Projection value to the values in an array of bytes.
oSyntaxes:
setBytes(int, byte[ ])
setBytes(String, byte[ ])
setDate
oSets a Projection value to a symjava.sql.Date value.
oSyntaxes:
setDate(int, Date)
setDate(String, Date)
setDouble
oSets a Projection value to a double value.
oSyntaxes:
setDouble(int, double)
setDouble(String, double)
setFloat
oSets a Projection value to a float value.
oSyntaxes:
setFloat(int, float)
setFloat(String, float)
setInt
oSets a Projection value to an int value.
oSyntaxes:
setInt(int, int)
setInt(String, int)
setLong
oSets a Projection value to a long value.
oSyntaxes:
setLong(int, long)
setLong(String, long)
setName(String)
oSets a RelationView's name.
setNull
oSets a Projection value to NULL.
oSyntaxes:
setNull(int, int)
setNull(String, int)
setShort
oSets a Projection value to a short value.
oSyntaxes:
setShort(int, short)
setShort(String, short)
setString
oSets a Projection value to a String value.
oSyntaxes:
setString(int, String)
setString(String, String)
setTime
oSets a Projection value to a symjava.sql.Time value.
oSyntaxes:
setTime(int, Time)
setTime(String, Time)
setTimestamp
oSets a Projection value to a symjava.sql.Timestamp value.
oSyntaxes:
setTimestamp(int, Timestamp)
setTimestamp(String, Timestamp)
setUnicodeStream
oSets a Projection value to a java.io.InputStream object in Unicode format.
oSyntaxes:
setUnicodeStream(int, InputStream, int)
setUnicodeStream(String, InputStream, int)
setValueFromString
oSets a Projection value to a String value.
oSyntaxes:
setValueFromString(int, String)
setValueFromString(int, String, int)
setValueFromString(int, String, int, int)
setValueFromString(int, String, String, int)
setValueFromString(int, String, String, int, int)
setValueFromString(int, String, int, int, int)
sqlTypeConvert
oReturns the int or String equivalent of a String or int data type name.
oSyntaxes:
sqlTypeConvert(String)
sqlTypeConvert(int)
unBindObj(Object)
oUnbinds an object.
unBindProj(int)
oUnbinds a projection.
undoRecord( )
oUndoes a record's data changes.


Constructors

Constructor index | Method index | Top | Bottom


Constructor: RelationView

Purpose Creates a RelationView object.
Syntax public RelationView(Request request) throws SQLException
public RelationView(AutoDetail detail) throws SQLException
Parameters request = Request object.

detail = AutoDetail object.

Description Creates a RelationView object.


Methods

Constructor index | Method index | Top | Bottom


Method: asciiStreamtoString

Purpose Returns a String from a java.io.InputStream object that is in ASCII format.
Syntax public static String asciiStreamtoString(InputStream is) throws IOException
Parameters is = Input stream in ASCII format.
Description Returns a String from a java.io.InputStream object that is in ASCII format.
See also java.io.InputStream (in the Java API Documentation)


Method: binaryArraytoString

Purpose Returns a String from an array of bytes.
Syntax public static String binaryArraytoString(byte b[ ]) throws IOException
Parameters b = Array of bytes.
Description Returns a String from an array of bytes. Zero values are translated to the string "/0". This method should be used for debugging purposes. Returns a String containing the ASCII representation of the data that is stored in the input byte array. The String is limited to 255 characters for performance reasons.


Method: binaryStreamtoString

Purpose Returns a String from a java.io.InputStream object that is in binary format.
Syntax public static String binaryStreamtoString(InputStream is,
int length) throws IOException
Parameters is = Input stream in binary format.

length =

Description Returns a String from a java.io.InputStream object that is in binary format. Zero values are translated to the string "/0". This function is should be used for debugging purposes. Returns a String containing the ASCII representation of the data that is stored in the provided java.io.InputStream. This string is limited to 255 characters, for performance reasons.
See also java.io.InputStream (in the Java API Documentation)


Method: bindCurrentRecord

Purpose Binds a RecordLink object to a RelationView's current record.
Syntax public void bindCurrentRecord(RecordLink obj) throws SQLException
Parameters obj = An object supporting the RecordLink interface.
Description Binds a RecordLink object to a RelationView's current record. Visual CafÄ Pro will notify the RecordLink object each time the current record's data changes.
See also RecordLink
Record


Method: bindList

Purpose Binds a list object to a RelationView's projection.
Syntax public ListBinder bindList(ConnectionInfo conn,
String sql,
ListLink listObj,
Vector columns) throws SQLException
public ListBinder bindList(ConnectionInfo conn,
String sql,
ListLink listObj,
int columns[ ]) throws SQLException
Parameters conn = ConnectionInfo object.

sql = The SQL statement to use when generating the list.

listObj = An object supporting the ListLink interface that wants to be bound to a list of columns.

columns = Columns to bind to the listObj.

Description Binds a Java object to a RelationView's projection. The Java object must support the ListLink interface. This method is only used for objects that support lists.

Returns a ListBinder object.

See also ListLink


Method: bindProj

Purpose Binds a Java object to a RelationView's projection.
Syntax public ProjBinder bindProj(int proj,
ProjLink obj) throws SQLException
Parameters proj = Ordinal number associated with the projection going from left to right in a view.

obj = A Java object that supports the ProjLink interface.

Description Binds a Java object to a RelationView's projection. The Java object must support the ProjLink interface.

Returns a ProjBinder object that can be used to set and get data for the projection.

See also ProjLink


Method: closeMultiView

Purpose Closes a MultiView.
Syntax public void closeMultiView( ) throws SQLException
Parameters None.
Description Closes a MultiView.


Method: deleteRecord

Purpose Marks a record for deletion.
Syntax public void deleteRecord( ) throws SQLException
Parameters None.
Description Marks the RelationView's current record for deletion and notifies the bound ProjLink and ListLink object of the change. The record will be deleted when the MultiView is saved.


Method: doesProjExist

Purpose Indicates whether or not a specific projection exists.
Syntax public boolean doesProjExist(String name) throws SQLException
Parameters name = Project name.
Description Indicates whether or not a specific projection exists.


Method: enableBindingNotify

Purpose Turns on or off the notification of ProjLink, ListLink, and RecordLink objects.
Syntax public void enableBindingNotify(boolean enable) throws SQLException
public void enableBindingNotify(boolean enable,
boolean applyToDetails) throws SQLException
Parameters enable = Indicates whether to enable (True) or disable (False) bound object notifications. When notification is enabled, the caller needs to invoke a notification when one is required.

applyToDetails = Indicates whether or not to apply the enable setting to all detail views that are based on the RelationView.

Description Turns on or off the notification of ProjLink, ListLink, and RecordLink objects when a RelationView's data changes.


Method: enableDetailSQL

Purpose Turns on or off the generation of SQL statements for the RelationView's detail views.
Syntax public void enableDetailSQL(boolean enable) throws SQLException
Parameters enable = Indicates whether to enable (True) or disable (False) the generation of SQL statements.
Description Turns on or off the generation of SQL statements for the RelationView's detail views.


Method: findProjByName

Purpose Returns a projection's ID.
Syntax public int findProjByName(String name) throws SQLException
Parameters name = Name of a projection.
Description Returns a projection's ID. The ID is the ordinal position of the projection relative to the left "side" of the RelationView.


Method: first

Purpose Sets a RelationView's current record to the view's first record.
Syntax public boolean first( ) throws SQLException
Parameters None.
Description Sets a RelationView's current record to the view's first record and notifies all bound ProjLink and ListLink object of the change.

Returns True if a Record object associated with the first Record in the RelationView was found. False, otherwise.

See also ListLink
ProjLink
Record


Method: getAutoDetail

Purpose Returns an AutoDetail object.
Syntax public AutoDetail getAutoDetail( ) throws SQLException
public AutoDetail getAutoDetail(String sql) throws SQLException
public AutoDetail getAutoDetail(ConnectionInfo conn,
String sql,
Properties requestProps,
Properties detailProps) throws SQLException
Parameters sql = SQL statement.

conn = ConnectionInfo object.

requestProps = java.util.Properties object that contains Request properties.

detailProps = java.util.Properties object that contains AutoDetail properties.

Description Returns an AutoDetail object which can be used to add a detail RelationView to this RelationView.


Method: getCurrentRecordNumber

Purpose Returns the record number for a RelationView's current record as an int.
Syntax public int getCurrentRecordNumber( )
Parameters None.
Description Returns the record number for the RelationView's current record.


Method: getCurrentRecordNumberString

Purpose Returns the record number for a RelationView's current record as a String.
Syntax public String getCurrentRecordNumberString( )
Parameters None.
Description Returns the record number for the RelationView's current record.


Method: getCurrentRecordState

Purpose Returns the state of a RelationView's current record.
Syntax public byte getCurrentRecordState( )
Parameters None.
Description Returns the state of the current record. Possible values:
oRECSTATE_DB_DELETED
oRECSTATE_DELETED
oRECSTATE_EXISTING
oRECSTATE_INVALID
oRECSTATE_MODIFIED
oRECSTATE_NEW
oRECSTATE_NEW_MODIFIED
See also Record


Method: getMultiView

Purpose Returns a MultiView.
Syntax public MultiView getMultiView( ) throws SQLException
Parameters None.
Description Returns a MultiView.


Method: getName

Purpose Returns a RelationView's name.
Syntax public String getName( ) throws SQLException
Parameters None.
Description Returns a RelationView's name.


Method: getNewRecord

Purpose Creates a new record.
Syntax public boolean getNewRecord( ) throws SQLException
Parameters None.
Description Returns the next new record in the view's Record buffers, sets the RelationView's current record to the new record, and notifies all bound ProjLink and ListLink object of the change.

Returns: True indicates that a new Record was positioned in the underlying view that the RelationView represents. False otherwise.

See also ListLink
ProjLink
Record


Method: getParentRelationView

Purpose Returns the parent RelationView for this RelationView.
Syntax public RelationView getParentRelationView( ) throws SQLException
Parameters None.
Description Returns the RelationView that is the parent to this RelationView (if it exists).


Method: getRecord

Purpose Returns a record.
Syntax public Record getRecord( ) throws SQLException
Parameters None.
Description Returns a record.


Method: goTo

Purpose Sets a RelationView's current record to the record with the specified record number.
Syntax public boolean goTo(int RecordNum) throws SQLException
public boolean goTo(String RecordNum) throws SQLException
Parameters RecordNum = An integer or String representing the ordinal number of the desired Record in the RelationView. If RecordNum is a String, it is assumed to be convertable to an integer.
Description Goes to a specific Record number in the view buffer referenced by the RelationView object and notifies all bound ProjLink and ListLink object of the change. This method facilitates random access of Records in a RelationView.

Returns: True indicates that a Record corresponding to the given record number was found. False otherwise.

See also ListLink
ProjLink
Record


Method: isBindingNotifyEnabled

Purpose Indicates whether or not binding notifications are enabled.
Syntax public boolean isBindingNotifyEnabled( ) throws SQLException
Parameters None.
Description Indicates whether ListLink, ProjLink, and RecordLink binding notifications are enabled (True) or disabled (False).


Method: isCurrentRecordReadable

Purpose Indicates whether or not a record can be read.
Syntax public boolean isCurrentRecordReadable( ) throws SQLException
Parameters None.
Description Indicates whether or not a record can be read.


Method: isCurrentRecordWritable

Purpose Indicates whether or not a record can be written to.
Syntax public boolean isCurrentRecordWritable( ) throws SQLException
Parameters None.
Description Indicates whether or not a record can be written to.


Method: next

Purpose Sets a RelationView's current record to the next record.
Syntax public boolean next( ) throws SQLException
Parameters None.
Description Moves the database cursor to the next Record in the view buffer and notifies all bound ProjLink and ListLink objects of the change.

Returns: True indicates that the next record was found. False indicates there were no more records.

See also ListLink
ProjLink
Record


Method: prev

Purpose Sets a RelationView's current record to the previous record.
Syntax public boolean prev( ) throws SQLException
Parameters None.
Description Moves the database cursor to the previous Record in the view buffer and notifies all bound ProjLink and ListLink objects of the change.

Returns: True indicates that the previous record was found. False indicates there is no previous record.

See also ListLink
ProjLink
Record


Method: processEmptyStringData

Purpose Processes an empty or NULL String.
Syntax public static String processEmptyStringData(String data,
RelationView rv,
int proj,
int columnType,
int treatBlankAsNull) throws SQLException
Parameters data = String to process.

rv = RelationView object.

proj = Projection ID for a column in a view traversing from left to right.

columnType = Column's data type.

treatBlankAsNull = Indicates whether or not to treat a blank as a NULL.

Description Processes an empty or NULL String. Returns the appropriate value to send to a database based on the columnType and treatBlankAsNull parameters.


Method: restartMultiView

Purpose Restarts a MultiView.
Syntax public void restartMultiView( ) throws SQLException
Parameters None.
Description A convenience function which calls the restart method on the containing MultiView. Called automatically after a successful saveMultiView. May also be used directly to pick up any database changes made by other applications.
See also restart
saveMultiView


Method: restartMultiView

Purpose Restarts a MultiView after modifying the root RelationView's SQL select statement.
Syntax public void restartMultiView(String newWhereClause) throws SQLException
Parameters newWhereClause = New SQL select statement for the root RelationView.
Description A convenience function which calls the restart method on the containing MultiView. Restarts the MultiView after modifying the root RelationView's SQL select statement with the newWhereClause.
See also restart
saveMultiView


Method: rewind

Purpose Rewinds a RelationView.
Syntax public void rewind( ) throws SQLException
Parameters None.
Description Resets a RelationView to its initial record state and notifies all bound ProjLink and ListLink objects of the change.
See also ListLink
ProjLink
Record


Method: saveMultiView

Purpose Saves a MultiView's changes.
Syntax public void saveMultiView( ) throws SQLException
Parameters None.
Description Saves all changes made to the containing MultiView object. This method saves all changes made by RelationView objects that refer to views in the scope of the containing MultiView object.
See also save
restartMultiview


Method: setName

Purpose Sets a RelationView's name.
Syntax public void setName(String newName) throws SQLException
Parameters newName = New name.
Description Sets the name associated with the RelationView in the MultiView object.


Method: sqlTypeConvert

Purpose Returns the int or String equivalent of a String or int data type name.
Syntax public static int sqlTypeConvert(String typename)
public static String sqlTypeConvert(int typeid)
Parameters typename = Data type name in a String.

typeid = Data type name in the form of a numerical value.

Description Returns the int or String equivalent of the input String or int data type name.


Method: unBindObj

Purpose Unbinds an object.
Syntax public void unBindObj(Object obj) throws SQLException
Parameters obj = Object to unbind.
Description Unbinds an object.


Method: unBindProj

Purpose Unbinds a projection.
Syntax public void unBindProj(int proj) throws SQLException
Parameters proj = Projection to unbind.
Description Unbinds a projection.


Method: undoRecord

Purpose Undoes a record's data changes.
Syntax public void undoRecord( ) throws SQLException
Parameters None.
Description Changes the current record to its original data values by doing the following:
  1. Undoing the data changes that have occurred since the record was retrieved from the database.
  2. Notifying bound ProjLink and ListLink objects that the record's data has changed.
See also ListLink
ProjLink


Constructor index | Method index | Top

Copyright © 1996 Symantec Corporation. All rights reserved.