com.nonesole.persistence.file
Interface IFileOperations

All Known Implementing Classes:
AbstractFilesOperation, PropertiesOperation, SerializationOperation, TXTOperation, XMLOperation

public interface IFileOperations

File Operation Interface

 Notice:
   1.All the objects as parameter must have isValid method.
     They must check themselves and tell frame whether or
     not they are valid.
   2.The primary keys of the parameter objects come from 
     toString() method.
   3.Parameter object creator must decide how to rewrite
     equals() and hashCode() method.
   4.The parameter url is where the file will be saved.  
 

Version:
1.0 - build in 2009-07-20
Author:
JACK LEE

Method Summary
 void batchDelete(java.util.List<java.lang.Object> obj, java.net.URL url)
          Delete objects of file system
 java.util.List<java.lang.Object> batchInsert(java.util.List<java.lang.Object> obj, java.net.URL url)
          Insert objects into file system
 java.util.List<java.lang.Object> batchUpdate(java.util.List<java.lang.Object> obj, java.net.URL url)
          Update objects of file system
 void delete(java.lang.Object obj, java.net.URL url)
          Delete one object of file system
 java.lang.Object insert(java.lang.Object obj, java.net.URL url)
          Insert one object into file system
 java.util.List<java.lang.Object> query(java.lang.Object obj, java.net.URL url)
          Query.
Those classed who implement this interface will set search condition by themselves.So it uses Object(common condition object) here.
 java.lang.Object update(java.lang.Object obj, java.net.URL url)
          Update one object of file system
 

Method Detail

insert

java.lang.Object insert(java.lang.Object obj,
                        java.net.URL url)
                        throws OperationsException
Insert one object into file system

Parameters:
obj - Object
url - - file URL
Returns:
Object - obj after dealing with
Throws:
OperationsException

update

java.lang.Object update(java.lang.Object obj,
                        java.net.URL url)
                        throws OperationsException
Update one object of file system

Parameters:
obj - Object
url - - file URL
Returns:
Object - obj after dealing with
Throws:
OperationsException

delete

void delete(java.lang.Object obj,
            java.net.URL url)
            throws OperationsException
Delete one object of file system

Parameters:
obj - Object
url - - file URL
Throws:
OperationsException

query

java.util.List<java.lang.Object> query(java.lang.Object obj,
                                       java.net.URL url)
                                       throws OperationsException
Query.
Those classed who implement this interface will set search condition by themselves.So it uses Object(common condition object) here.

Parameters:
obj - Object
url - - file URL
Returns:
result of search
Throws:
OperationsException

batchInsert

java.util.List<java.lang.Object> batchInsert(java.util.List<java.lang.Object> obj,
                                             java.net.URL url)
                                             throws OperationsException
Insert objects into file system

Parameters:
obj - list of Object
url - - file URL
Returns:
Object - list of objs after dealing with
Throws:
OperationsException

batchUpdate

java.util.List<java.lang.Object> batchUpdate(java.util.List<java.lang.Object> obj,
                                             java.net.URL url)
                                             throws OperationsException
Update objects of file system

Parameters:
obj - list of Object
url - - file URL
Returns:
Object - list of objs after dealing with
Throws:
OperationsException

batchDelete

void batchDelete(java.util.List<java.lang.Object> obj,
                 java.net.URL url)
                 throws OperationsException
Delete objects of file system

Parameters:
obj - list of Object
url - - file URL
Throws:
OperationsException