com.intersys.classes
Class File

java.lang.Object
  extended bycom.intersys.classes.CacheGeneric
      extended bycom.intersys.classes.CacheRootObject
          extended bycom.intersys.classes.RegisteredObject
              extended bycom.intersys.classes.AbstractStream
                  extended bycom.intersys.classes.File
All Implemented Interfaces:
ObjectHandle, Serializable

public class File
extends AbstractStream
implements Serializable

See Also:
Serialized Form

Constructor Summary
File(com.intersys.cache.CacheObject ref)
          NB: DO NOT USE IN APPLICATION!
File(Database db)
          Creates a new instance of object "" in Cache database and corresponding object of class File.
 
Method Summary
static String _className(Database db, Boolean fullname)
          Runs method _className in Cache
 void _clear()
          Runs method _clear in Cache
static Boolean _copyFile(Database db, String from, String to)
          Runs method _copyFile in Cache
static Boolean _createDirectory(Database db, String name)
          Runs method _createDirectory in Cache
static Boolean _createDirectoryChain(Database db, String name)
          Runs method _createDirectoryChain in Cache
static Boolean _createNewDir(Database db, String directory, String name)
          Runs method _createNewDir in Cache
 Date _dateCreatedGet()
          Runs method _dateCreatedGet in Cache
 Date _dateModifiedGet()
          Runs method _dateModifiedGet in Cache
static String _getDirectory(Database db, String name)
          Runs method _getDirectory in Cache
static String _getFileDateCreated(Database db, String filename)
          Runs method _getFileDateCreated in Cache
static String _getFileDateModified(Database db, String filename)
          Runs method _getFileDateModified in Cache
static String _getFilename(Database db, String name)
          Runs method _getFilename in Cache
static Integer _getFileSize(Database db, String filename)
          Runs method _getFileSize 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 Integer _isA(Database db, String isclass)
          Runs method _isA in Cache
 Timestamp _lastModifiedGet()
          Runs method _lastModifiedGet in Cache
static String _managerDirectory(Database db)
          Runs method _managerDirectory in Cache
static String _normalizeDirectory(Database db, String filename)
          Runs method _normalizeDirectory in Cache
static String _packageName(Database db)
          Runs method _packageName in Cache
 String _read(IntegerHolder len)
          Runs method _read in Cache
static Integer _removeDirectory(Database db, String name)
          Runs method _removeDirectory in Cache
static Integer _rename(Database db, String oldname, String newname)
          Runs method _rename in Cache
 void _rewind()
          Runs method _rewind in Cache
 Integer _sizeGet()
          Runs method _sizeGet in Cache
 void _write()
          Runs method _write in Cache
 void _write(String data)
          Runs method _write in Cache
 void _writeLine()
          Runs method _writeLine in Cache
 void _writeLine(String data)
          Runs method _writeLine in Cache
static void check_dateCreatedValid(Database db)
          Verifies that indexes for property _dateCreated in zObjVal are the same as in Cache.
static void check_dateModifiedValid(Database db)
          Verifies that indexes for property _dateModified in zObjVal are the same as in Cache.
static void check_isOpenValid(Database db)
          Verifies that indexes for property _isOpen in zObjVal are the same as in Cache.
static void check_modeValid(Database db)
          Verifies that indexes for property _mode in zObjVal are the same as in Cache.
static void check_nameValid(Database db)
          Verifies that indexes for property _name 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.
 void close()
          Runs method _close in Cache
static boolean delete(Database db, String filename)
          Runs method _delete in Cache
static boolean directoryExists(Database db, String filename)
          Runs method %directoryExists in Cache
static boolean exists(Database db, String filename)
          Runs method _exists in Cache
 Date get_dateCreated()
          Returns value of property _dateCreated
 Date get_dateModified()
          Returns value of property _dateModified
 Boolean get_isOpen()
          Returns value of property _isOpen
 String get_mode()
          Returns value of property _mode
 String get_name()
          Returns value of property _name
 CacheClass getCacheClass()
          Allows access metadata information about type of this object in Cache database.
static String getCacheClassName()
          Returns class name of the class File as it is in Cache Database.
 void open(String mode)
          Runs method Open in Cache
static CacheQuery query_DriveList(Database db)
           
static CacheQuery query_FileSet(Database db)
           
static CacheQuery query_ParseDirectory(Database db)
           
 void set_mode(String value)
          Returns value of property _mode
 void set_name(String value)
          Returns value of property _name
 
Methods inherited from class com.intersys.classes.AbstractStream
_copyFrom, _deleteAttribute, _flush, _getAttribute, _getAttribute, _inputFromDevice, _inputFromDevice, _inputFromDevice, _isDefinedAttribute, _moveToEnd, _nextAttribute, _outputToDevice, _outputToDevice, _setAttribute, check_atEndValid, get_atEnd, get_lastModified, get_size, set_atEnd
 
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

File

public File(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.


File

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

Parameters:
db - Database object used for connection with Cache database.
Throws:
CacheException - in case of error.
Method Detail

getCacheClassName

public static String getCacheClassName()
Returns class name of the class File 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 AbstractStream
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_dateCreatedValid

public static void check_dateCreatedValid(Database db)
                                   throws CacheException
Verifies that indexes for property _dateCreated 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_dateCreated

public Date get_dateCreated()
                     throws CacheException
Returns value of property _dateCreated

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

check_dateModifiedValid

public static void check_dateModifiedValid(Database db)
                                    throws CacheException
Verifies that indexes for property _dateModified 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_dateModified

public Date get_dateModified()
                      throws CacheException
Returns value of property _dateModified

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

check_isOpenValid

public static void check_isOpenValid(Database db)
                              throws CacheException
Verifies that indexes for property _isOpen 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_isOpen

public Boolean get_isOpen()
                   throws CacheException
Returns value of property _isOpen

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

check_modeValid

public static void check_modeValid(Database db)
                            throws CacheException
Verifies that indexes for property _mode 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_mode

public String get_mode()
                throws CacheException
Returns value of property _mode

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

set_mode

public void set_mode(String value)
              throws CacheException
Returns value of property _mode

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

check_nameValid

public static void check_nameValid(Database db)
                            throws CacheException
Verifies that indexes for property _name 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_name

public String get_name()
                throws CacheException
Returns value of property _name

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

set_name

public void set_name(String value)
              throws CacheException
Returns value of property _name

Returns:
current value of _name 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)

_clear

public void _clear()
            throws CacheException
Runs method _clear in Cache

Overrides:
_clear in class AbstractStream
Throws:
CacheException - if any error occured while running the method.
See Also:
_clear()

close

public void close()
           throws CacheException
Runs method _close in Cache

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

_copyFile

public static Boolean _copyFile(Database db,
                                String from,
                                String to)
                         throws CacheException
Runs method _copyFile in Cache

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

_createDirectory

public static Boolean _createDirectory(Database db,
                                       String name)
                                throws CacheException
Runs method _createDirectory in Cache

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

_createDirectoryChain

public static Boolean _createDirectoryChain(Database db,
                                            String name)
                                     throws CacheException
Runs method _createDirectoryChain in Cache

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

_createNewDir

public static Boolean _createNewDir(Database db,
                                    String directory,
                                    String name)
                             throws CacheException
Runs method _createNewDir in Cache

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

_dateCreatedGet

public Date _dateCreatedGet()
                     throws CacheException
Runs method _dateCreatedGet in Cache

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

_dateModifiedGet

public Date _dateModifiedGet()
                      throws CacheException
Runs method _dateModifiedGet in Cache

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

delete

public static boolean delete(Database db,
                             String filename)
                      throws CacheException
Runs method _delete in Cache

Parameters:
db - represented as Database
filename - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.

directoryExists

public static boolean directoryExists(Database db,
                                      String filename)
                               throws CacheException
Runs method %directoryExists in Cache

Parameters:
db - represented as Database
filename - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.

exists

public static boolean exists(Database db,
                             String filename)
                      throws CacheException
Runs method _exists in Cache

Parameters:
db - represented as Database
filename - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.

_getDirectory

public static String _getDirectory(Database db,
                                   String name)
                            throws CacheException
Runs method _getDirectory in Cache

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

_getFileDateCreated

public static String _getFileDateCreated(Database db,
                                         String filename)
                                  throws CacheException
Runs method _getFileDateCreated in Cache

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

_getFileDateModified

public static String _getFileDateModified(Database db,
                                          String filename)
                                   throws CacheException
Runs method _getFileDateModified in Cache

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

_getFileSize

public static Integer _getFileSize(Database db,
                                   String filename)
                            throws CacheException
Runs method _getFileSize in Cache

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

_getFilename

public static String _getFilename(Database db,
                                  String name)
                           throws CacheException
Runs method _getFilename in Cache

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

_lastModifiedGet

public Timestamp _lastModifiedGet()
                           throws CacheException
Runs method _lastModifiedGet in Cache

Overrides:
_lastModifiedGet in class AbstractStream
Throws:
CacheException - if any error occured while running the method.
See Also:
_lastModifiedGet()

_managerDirectory

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

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

_normalizeDirectory

public static String _normalizeDirectory(Database db,
                                         String filename)
                                  throws CacheException
Runs method _normalizeDirectory in Cache

Parameters:
db - represented as Database
filename - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.

open

public void open(String mode)
          throws CacheException
Runs method Open in Cache

Parameters:
mode - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.

_read

public String _read(IntegerHolder len)
             throws CacheException
Runs method _read in Cache

Overrides:
_read in class AbstractStream
Parameters:
len - represented as com.intersys.objects.IntegerHolder
Throws:
CacheException - if any error occured while running the method.
See Also:
_read(com.intersys.objects.IntegerHolder)

_removeDirectory

public static Integer _removeDirectory(Database db,
                                       String name)
                                throws CacheException
Runs method _removeDirectory in Cache

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

_rename

public static Integer _rename(Database db,
                              String oldname,
                              String newname)
                       throws CacheException
Runs method _rename in Cache

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

_rewind

public void _rewind()
             throws CacheException
Runs method _rewind in Cache

Overrides:
_rewind in class AbstractStream
Throws:
CacheException - if any error occured while running the method.
See Also:
_rewind()

_sizeGet

public Integer _sizeGet()
                 throws CacheException
Runs method _sizeGet in Cache

Overrides:
_sizeGet in class AbstractStream
Throws:
CacheException - if any error occured while running the method.
See Also:
_sizeGet()

_write

public void _write()
            throws CacheException
Runs method _write in Cache

Throws:
CacheException - if any error occured while running the method.
See Also:
_write(java.lang.String)

_write

public void _write(String data)
            throws CacheException
Runs method _write in Cache

Overrides:
_write in class AbstractStream
Parameters:
data - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
_write(java.lang.String)

_writeLine

public void _writeLine()
                throws CacheException
Runs method _writeLine in Cache

Throws:
CacheException - if any error occured while running the method.
See Also:
_writeLine(java.lang.String)

_writeLine

public void _writeLine(String data)
                throws CacheException
Runs method _writeLine in Cache

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

query_DriveList

public static CacheQuery query_DriveList(Database db)
                                  throws CacheException
Throws:
CacheException

query_FileSet

public static CacheQuery query_FileSet(Database db)
                                throws CacheException
Throws:
CacheException

query_ParseDirectory

public static CacheQuery query_ParseDirectory(Database db)
                                       throws CacheException
Throws:
CacheException