dke.smwp.serialize
Class SerializeCompleteImpl

java.lang.Object
  |
  +--dke.smwp.serialize.SerializeTupleModification
        |
        +--dke.smwp.serialize.SerializeCompleteImpl

public class SerializeCompleteImpl
extends SerializeTupleModification

implementation of serialization strategy "onTheFly"

Version:
1.0
Author:
Werner Enser

Field Summary
private static SerializeCompleteImpl _instance
          sole serialization instance
static java.lang.String MAINTENANCE_MODE
          serialization strategy for this class
 
Fields inherited from class dke.smwp.serialize.SerializeTupleModification
DEBUG
 
Constructor Summary
protected SerializeCompleteImpl()
          default constructor
 
Method Summary
protected  void modifyPagesCompl(java.sql.Connection con, PageSer[] pages)
          serializes all given pages - created new from scratch
 void serializeFragmentDeletion(java.sql.Connection con, java.lang.String fc_longName, TColumnTable oldTuple)
          deletes published pages (xml documents)
 void serializeFragmentInsertion(java.sql.Connection con, java.lang.String fc_longName, TColumnTable newTuple)
          creates new Page Class/pages as xml documents
 void serializeFragmentModification(java.sql.Connection con, java.lang.String fc_longName, TColumnTable oldTuple, TColumnTable newTuple)
          updates published Page Class/pages (xml documents) by deleting old pages designated by fragmentation parameter values of oldTuple and creating new pages designated by newTuple
 void serializeTupleDeletion(java.sql.Connection con, java.lang.String fcName, java.lang.String rowId, TColumnTable oldTuple)
           
 void serializeTupleInsertion(java.sql.Connection con, java.lang.String fcName, java.lang.String rowId, TColumnTable newTuple)
          inserts tuple data into affected page
 void serializeTupleModification(java.sql.Connection con, java.lang.String fcName, java.lang.String rowId, TColumnTable oldTuple, TColumnTable newTuple)
          updates Page Class/pages (xml documents)
 
Methods inherited from class dke.smwp.serialize.SerializeTupleModification
buildModificationDescrObj, getFragmentParameters, getInstance, tupleAsXMLTuple
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

_instance

private static SerializeCompleteImpl _instance
sole serialization instance

MAINTENANCE_MODE

public static final java.lang.String MAINTENANCE_MODE
serialization strategy for this class
Constructor Detail

SerializeCompleteImpl

protected SerializeCompleteImpl()
default constructor
Method Detail

modifyPagesCompl

protected void modifyPagesCompl(java.sql.Connection con,
                                PageSer[] pages)
                         throws org.xml.sax.SAXException,
                                java.sql.SQLException,
                                java.io.IOException
serializes all given pages - created new from scratch
Parameters:
con - Connection handle
pages - pages which are to be modified
Throws:
org.xml.sax.SAXException - creating / parsing xml documents failed
java.sql.SQLException - fetching data failed
java.io.IOException - reading / writing xml documents failed

serializeFragmentDeletion

public void serializeFragmentDeletion(java.sql.Connection con,
                                      java.lang.String fc_longName,
                                      TColumnTable oldTuple)
                               throws java.io.IOException,
                                      java.sql.SQLException,
                                      org.xml.sax.SAXException
deletes published pages (xml documents)
Overrides:
serializeFragmentDeletion in class SerializeTupleModification
Parameters:
con - Connection handle
fc_longName - name of Fragment Class where a fragment is being deleted
oldTuple - fragmentation parameters for fragment, which is to be deleted
Throws:
java.io.IOException - reading / writing xml document failed
java.sql.SQLException - fetching data failed
org.xml.sax.SAXException - generating / parsing xml document(s) failed

serializeFragmentInsertion

public void serializeFragmentInsertion(java.sql.Connection con,
                                       java.lang.String fc_longName,
                                       TColumnTable newTuple)
                                throws java.sql.SQLException,
                                       java.io.IOException,
                                       org.xml.sax.SAXException
creates new Page Class/pages as xml documents
Overrides:
serializeFragmentInsertion in class SerializeTupleModification
Parameters:
con - Connection handle
fc_longName - name of Fragment Class which gains a new fragment
newTuple - fragmentation parameters of new fragment
Throws:
java.sql.SQLException - fetching data failed
java.io.IOException - writing xml document failed
org.xml.sax.SAXException - creating xml document failed

serializeFragmentModification

public void serializeFragmentModification(java.sql.Connection con,
                                          java.lang.String fc_longName,
                                          TColumnTable oldTuple,
                                          TColumnTable newTuple)
                                   throws java.io.IOException,
                                          java.sql.SQLException,
                                          org.xml.sax.SAXException
updates published Page Class/pages (xml documents) by deleting old pages designated by fragmentation parameter values of oldTuple and creating new pages designated by newTuple
Overrides:
serializeFragmentModification in class SerializeTupleModification
Parameters:
con - Connection handle
fc_longName - name of Fragment Class in which a fragment is updated
oldTuple - fragmentation parameters of old tuple
newTuple - fragmentation parameters of new tuple
Throws:
java.sql.SQLException - fetching data failed
java.io.IOException - writing xml document failed
org.xml.sax.SAXException - creating xml document failed

serializeTupleModification

public void serializeTupleModification(java.sql.Connection con,
                                       java.lang.String fcName,
                                       java.lang.String rowId,
                                       TColumnTable oldTuple,
                                       TColumnTable newTuple)
                                throws java.io.IOException,
                                       java.sql.SQLException,
                                       org.xml.sax.SAXException
Description copied from class: SerializeTupleModification
updates Page Class/pages (xml documents)
Overrides:
serializeTupleModification in class SerializeTupleModification
Parameters:
con -  
fcName -  
rowId -  
oldTuple -  
newTuple -  
Throws:
java.io.IOException -  
java.sql.SQLException -  
org.xml.sax.SAXException -  

serializeTupleInsertion

public void serializeTupleInsertion(java.sql.Connection con,
                                    java.lang.String fcName,
                                    java.lang.String rowId,
                                    TColumnTable newTuple)
                             throws java.io.IOException,
                                    java.sql.SQLException,
                                    org.xml.sax.SAXException
inserts tuple data into affected page
Overrides:
serializeTupleInsertion in class SerializeTupleModification
Parameters:
con - Connection object
fcName - fragment class realtion which was updated
rowId - row id of the inserted tuple
newTuple - data of inserted tuple
Throws:
java.io.IOException - reading / writing xml document failed
java.sql.SQLException - fetching data failed
org.xml.sax.SAXException - generating / parsing xml document(s) failed

serializeTupleDeletion

public void serializeTupleDeletion(java.sql.Connection con,
                                   java.lang.String fcName,
                                   java.lang.String rowId,
                                   TColumnTable oldTuple)
                            throws java.io.IOException,
                                   java.sql.SQLException,
                                   org.xml.sax.SAXException
Overrides:
serializeTupleDeletion in class SerializeTupleModification
Parameters:
con -  
fcName -  
rowId -  
oldTuple -  
Throws:
java.io.IOException -  
java.sql.SQLException -  
org.xml.sax.SAXException -