com.intersys.classes
Class FileCharacterStream

java.lang.Object
  extended bycom.intersys.classes.CacheGeneric
      extended bycom.intersys.classes.CacheRootObject
          extended bycom.intersys.classes.RegisteredObject
              extended bycom.intersys.classes.SerialObject
                  extended bycom.intersys.classes.SerialStream
                      extended bycom.intersys.classes.CharacterStream
                          extended bycom.intersys.classes.FileCharacterStream
All Implemented Interfaces:
ObjectHandle, Serializable

public class FileCharacterStream
extends CharacterStream
implements Serializable

See Also:
Serialized Form

Constructor Summary
FileCharacterStream(com.intersys.cache.CacheObject ref)
          NB: DO NOT USE IN APPLICATION!
FileCharacterStream(Database db)
          Creates a new instance of object "" in Cache database and corresponding object of class FileCharacterStream.
 
Method Summary
static String _className(Database db, Boolean fullname)
          Runs method _className in Cache
static void _deleteStream(Database db, Oid oid)
          Runs method _deleteStream in Cache
 String _filenameGet()
          Runs method _filenameGet in Cache
 void _filenameSet(String file)
          Runs method _filenameSet in Cache
static String _getParameter(Database db)
          Runs method _getParameter in Cache
static String _getParameter(Database db, String paramname)
          Runs method _getParameter in Cache
static String _getStreamIdForFile(Database db, String file, String contenttype)
          Runs method _getStreamIdForFile in Cache
static Integer _isA(Database db, String isclass)
          Runs method _isA in Cache
 Boolean _isFileUnicode()
          Runs method _isFileUnicode in Cache
 void _linkToFile(String filename)
          Runs method _linkToFile in Cache
static String _logicalToOdbc(Database db)
          Runs method _logicalToOdbc in Cache
static String _logicalToOdbc(Database db, String _val)
          Runs method _logicalToOdbc in Cache
static String _newFileName(Database db)
          Runs method _newFileName in Cache
static String _newFileName(Database db, String ext)
          Runs method _newFileName in Cache
static String _odbcToLogical(Database db)
          Runs method _odbcToLogical in Cache
static String _odbcToLogical(Database db, String _val)
          Runs method _odbcToLogical in Cache
static RegisteredObject _open(Database db, Oid oid)
          Runs method %Open in Cache to open an object from Cache database and creates corresponding object of class FileCharacterStream.
static RegisteredObject _open(Database db, Oid oid, int concurrency)
           
static String _packageName(Database db)
          Runs method _packageName in Cache
 void _translateTableSet(String table)
          Runs method _translateTableSet in Cache
static void check_filenameValid(Database db)
          Verifies that indexes for property _filename in zObjVal are the same as in Cache.
static void check_translateTableValid(Database db)
          Verifies that indexes for property _translateTable in zObjVal are the same as in Cache.
static void checkAllFieldsValid(Database db)
          Verifies that all fields from Cache class are exposed with accessor methods in Java class and that values for indexes in zObjVal are the same as in Cache.
static void checkAllMethods(Database db)
          Verifies that all fields from Cache class are exposed with accessor methods in Java class and that values for indexes in zObjVal are the same as in Cache.
 String get_translateTable()
          Returns value of property _translateTable
 CacheClass getCacheClass()
          Allows access metadata information about type of this object in Cache database.
static String getCacheClassName()
          Returns class name of the class FileCharacterStream as it is in Cache Database.
 void set_translateTable(String value)
          Returns value of property _translateTable
 
Methods inherited from class com.intersys.classes.CharacterStream
_lineTerminatorGet, _lineTerminatorSet, _moveToEnd, _read, _readLine, _write, _write, _writeLine, _writeLine, get_lineTerminator, getReader, getWriter, set_lineTerminator
 
Methods inherited from class com.intersys.classes.SerialStream
_clear, _copyFrom, _copyFromAndSave, _deleteAttribute, _flush, _getAttribute, _getAttribute, _getStreamId, _inputFromDevice, _inputFromDevice, _inputFromDevice, _isDefinedAttribute, _isNull, _lastModifiedGet, _nextAttribute, _openStream, _outputToDevice, _outputToDevice, _rewind, _saveStream, _setAttribute, _sizeGet
 
Methods inherited from class com.intersys.classes.SerialObject
_getSwizzleObject, _getSwizzleObject, _getSwizzleObject, getOid, open, openOnServer, serialize, serialize
 
Methods inherited from class com.intersys.classes.RegisteredObject
_className, _className, _constructClone, _constructClone, _constructClone, _isModified, _normalizeObject, _packageName, _validateObject, _validateObject, constructClone, constructClone, getZRef
 
Methods inherited from class com.intersys.classes.CacheRootObject
_close, castTo, equals, getDatabase, getField, getOref, getProxy, getString, hashCode, release, releaseInternal, toString
 
Methods inherited from class com.intersys.classes.CacheGeneric
checkAllFieldsValid, checkFieldsLimited, reset
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileCharacterStream

public FileCharacterStream(com.intersys.cache.CacheObject ref)
                    throws CacheException
NB: DO NOT USE IN APPLICATION!

Used to construct a Java object, corresponding to existing object in Cache database.

See Also:
_open(com.intersys.objects.Database, com.intersys.objects.Oid)

FileCharacterStream

public FileCharacterStream(Database db)
                    throws CacheException
Creates a new instance of object "" in Cache database and corresponding object of class FileCharacterStream.

Parameters:
db - Database object used for connection with Cache database.
Throws:
CacheException - in case of error.
See Also:
_open(com.intersys.objects.Database, com.intersys.objects.Oid)
Method Detail

_open

public static RegisteredObject _open(Database db,
                                     Oid oid)
                              throws CacheException
Runs method %Open in Cache to open an object from Cache database and creates corresponding object of class FileCharacterStream.

Parameters:
db - Database object used for connection with Cache database.
oid - Object ID as specified in Cache. represented as Oid.
Returns:
RegisteredObject , corresponding to opened object. This object may be of FileCharacterStream or of any of it's subclasses. Cast to FileCharacterStream is garanteed to pass without ClassCastException exception.
Throws:
CacheException - in case of error.
See Also:
ClassCastException, FileCharacterStream(com.intersys.objects.Database)

_open

public static RegisteredObject _open(Database db,
                                     Oid oid,
                                     int concurrency)
                              throws CacheException
Throws:
CacheException

getCacheClassName

public static String getCacheClassName()
Returns class name of the class FileCharacterStream as it is in Cache Database. Note, that this is a static method, so no object specific information can be returned. Use getCacheClass().geName() to get the class name for specific object.

Returns:
Cache class name as a String
See Also:
getCacheClass(), CacheClass.getName()

getCacheClass

public CacheClass getCacheClass()
                         throws CacheException
Allows access metadata information about type of this object in Cache database. Also can be used for dynamic binding (accessing properties and calling methods without particular class known).

Overrides:
getCacheClass in class CharacterStream
Returns:
CacheClass object for this object type.
Throws:
CacheException

checkAllFieldsValid

public static void checkAllFieldsValid(Database db)
                                throws CacheException
Verifies that all fields from Cache class are exposed with accessor methods in Java class and that values for indexes in zObjVal are the same as in Cache. It does not return anything but it thorws an exception in case of inconsistency.

Please note, that if any field is not exposed that i critical error. But if there is any inconsistncy in zObjVal indexes this is fatal and class can not work correctly and must be regenrated.

Parameters:
db - Databse used for connection. Note that if you are using multiple databases the class can be consistent with one and inconsistent with another.
Throws:
InvalidClassException - if any inconsistency is found.
CacheException - if any error occured during verification, e.g. communication error with Databse.
See Also:
InvalidPropertyException

checkAllMethods

public static void checkAllMethods(Database db)
                            throws CacheException
Verifies that all fields from Cache class are exposed with accessor methods in Java class and that values for indexes in zObjVal are the same as in Cache. It does not return anything but it thorws an exception in case of inconsistency.

Please note, that if any field is not exposed that i critical error. But if there is any inconsistncy in zObjVal indexes this is fatal and class can not work correctly and must be regenrated.

Parameters:
db - Databse used for connection. Note that if you are using multiple databases the class can be consistent with one and inconsistent with another.
Throws:
InvalidClassException - if any inconsistency is found.
CacheException - if any error occured during verification, e.g. communication error with Databse.
See Also:
InvalidPropertyException

check_filenameValid

public static void check_filenameValid(Database db)
                                throws CacheException
Verifies that indexes for property _filename in zObjVal are the same as in Cache. It does not return anything but it thorws an exception in case of inconsistency.

Please note, that if there is any inconsistncy in zObjVal indexes this is fatal and class can not work correctly and must be regenrated.

Parameters:
db - Databse used for connection. Note that if you are using multiple databases the class can be consistent with one and inconsistent with another.
Throws:
InvalidClassException - if any inconsistency is found.
CacheException - if any error occured during verification, e.g. communication error with Databse.
See Also:
checkAllFieldsValid(com.intersys.objects.Database)

check_translateTableValid

public static void check_translateTableValid(Database db)
                                      throws CacheException
Verifies that indexes for property _translateTable in zObjVal are the same as in Cache. It does not return anything but it thorws an exception in case of inconsistency.

Please note, that if there is any inconsistncy in zObjVal indexes this is fatal and class can not work correctly and must be regenrated.

Parameters:
db - Databse used for connection. Note that if you are using multiple databases the class can be consistent with one and inconsistent with another.
Throws:
InvalidClassException - if any inconsistency is found.
CacheException - if any error occured during verification, e.g. communication error with Databse.
See Also:
checkAllFieldsValid(com.intersys.objects.Database)

get_translateTable

public String get_translateTable()
                          throws CacheException
Returns value of property _translateTable

Returns:
current value of _translateTable represented as
Throws:
CacheException - if any error occured during value retrieval.

set_translateTable

public void set_translateTable(String value)
                        throws CacheException
Returns value of property _translateTable

Returns:
current value of _translateTable represented as
Throws:
CacheException - if any error occured during value retrieval.

_className

public static String _className(Database db,
                                Boolean fullname)
                         throws CacheException
Runs method _className in Cache

Parameters:
db - represented as Database
fullname - represented as java.lang.Boolean
Throws:
CacheException - if any error occured while running the method.
See Also:
_className(Database,java.lang.Boolean)

_getParameter

public static String _getParameter(Database db)
                            throws CacheException
Runs method _getParameter in Cache

Parameters:
db - represented as Database
Throws:
CacheException - if any error occured while running the method.
See Also:
_getParameter(Database,java.lang.String)

_getParameter

public static String _getParameter(Database db,
                                   String paramname)
                            throws CacheException
Runs method _getParameter in Cache

Parameters:
db - represented as Database
paramname - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
_getParameter(Database,java.lang.String)

_isA

public static Integer _isA(Database db,
                           String isclass)
                    throws CacheException
Runs method _isA in Cache

Parameters:
db - represented as Database
isclass - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
_isA(Database,java.lang.String)

_packageName

public static String _packageName(Database db)
                           throws CacheException
Runs method _packageName in Cache

Parameters:
db - represented as Database
Throws:
CacheException - if any error occured while running the method.
See Also:
_packageName(Database)

_deleteStream

public static void _deleteStream(Database db,
                                 Oid oid)
                          throws CacheException
Runs method _deleteStream in Cache

Parameters:
db - represented as Database
oid - represented as com.intersys.objects.Oid
Throws:
CacheException - if any error occured while running the method.
See Also:
_deleteStream(Database,com.intersys.objects.Oid)

_filenameGet

public String _filenameGet()
                    throws CacheException
Runs method _filenameGet in Cache

Throws:
CacheException - if any error occured while running the method.
See Also:
_filenameGet()

_filenameSet

public void _filenameSet(String file)
                  throws CacheException
Runs method _filenameSet in Cache

Parameters:
file - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
_filenameSet(java.lang.String)

_getStreamIdForFile

public static String _getStreamIdForFile(Database db,
                                         String file,
                                         String contenttype)
                                  throws CacheException
Runs method _getStreamIdForFile in Cache

Parameters:
db - represented as Database
file - represented as java.lang.String
contenttype - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
_getStreamIdForFile(Database,java.lang.String,java.lang.String)

_isFileUnicode

public Boolean _isFileUnicode()
                       throws CacheException
Runs method _isFileUnicode in Cache

Throws:
CacheException - if any error occured while running the method.
See Also:
_isFileUnicode()

_linkToFile

public void _linkToFile(String filename)
                 throws CacheException
Runs method _linkToFile in Cache

Parameters:
filename - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
_linkToFile(java.lang.String)

_logicalToOdbc

public static String _logicalToOdbc(Database db)
                             throws CacheException
Runs method _logicalToOdbc in Cache

Parameters:
db - represented as Database
Throws:
CacheException - if any error occured while running the method.
See Also:
_logicalToOdbc(Database,java.lang.String)

_logicalToOdbc

public static String _logicalToOdbc(Database db,
                                    String _val)
                             throws CacheException
Runs method _logicalToOdbc in Cache

Parameters:
db - represented as Database
_val - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
_logicalToOdbc(Database,java.lang.String)

_newFileName

public static String _newFileName(Database db)
                           throws CacheException
Runs method _newFileName in Cache

Parameters:
db - represented as Database
Throws:
CacheException - if any error occured while running the method.
See Also:
_newFileName(Database,java.lang.String)

_newFileName

public static String _newFileName(Database db,
                                  String ext)
                           throws CacheException
Runs method _newFileName in Cache

Parameters:
db - represented as Database
ext - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
_newFileName(Database,java.lang.String)

_odbcToLogical

public static String _odbcToLogical(Database db)
                             throws CacheException
Runs method _odbcToLogical in Cache

Parameters:
db - represented as Database
Throws:
CacheException - if any error occured while running the method.
See Also:
_odbcToLogical(Database,java.lang.String)

_odbcToLogical

public static String _odbcToLogical(Database db,
                                    String _val)
                             throws CacheException
Runs method _odbcToLogical in Cache

Parameters:
db - represented as Database
_val - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
_odbcToLogical(Database,java.lang.String)

_translateTableSet

public void _translateTableSet(String table)
                        throws CacheException
Runs method _translateTableSet in Cache

Parameters:
table - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
_translateTableSet(java.lang.String)