|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dke.smwp.serialize.SerializeTupleModification
Base class for all page serialization approaches which covers tuple modifications in fragment class relations and fragmentation relations.
triggeredSerializeFragmentDeletion / -insertion / -modification
Tuple Insertion in Fragmentation Relation:
For every page class the fragment class (whose fragmentation relation was modified)
is mapped to a new page (xml document) will be created.
Tuple Deletion in Fragmentation Relation:
For every page class the fragment (class whose fragmentation relation was modified)
is mapped to the pages which used the deletes tuples from the fragmentation relation
are being deleted.
Tuple Update in Fragmentation Relation:
Updating tuples from fragmentation relation will result in deletion of existing pages,
which used the old tuples for parameterization. Pages with the new (updated) tuples are
being created.
triggeredSerializeTupleDeletion /- insertion / -modification
Tuples of fragment class relation can belong to none, one or more fragments within the one fragment class. Inserted tuples are being inserted into pages which map the fragment the tuple belongs to. Deleted tuples are removed from those pages. Updated tuples can fall into another fragment, no fragment or stay in the same fragment.
The method pages are being updated is determined by the maintenance mocde defined individually for each page class.
Field Summary | |
private static SerializeIncrementalImpl |
_instance
|
protected static boolean |
DEBUG
|
Constructor Summary | |
SerializeTupleModification()
|
Method Summary | |
protected static TupleModificationDescr |
buildModificationDescrObj(FragmentSer frag,
java.lang.String rowId,
TColumnTable newTuple,
int mod)
|
protected static java.util.Hashtable |
getFragmentParameters(java.sql.Connection con,
FragmentClassSer fc,
TColumnTable tuple)
Extracts the fragment parameters from the given tuple that resides within the given fragment class. |
static SerializeTupleModification |
getInstance()
gets instance of SerializeIncrementalImpl (only one instance exists) |
abstract void |
serializeFragmentDeletion(java.sql.Connection con,
java.lang.String fc_longName,
TColumnTable oldTuple)
deletes published pages (xml documents) |
abstract void |
serializeFragmentInsertion(java.sql.Connection con,
java.lang.String fc_longName,
TColumnTable newTuple)
creates new Page Class/pages as xml documents |
abstract 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 |
abstract void |
serializeTupleDeletion(java.sql.Connection con,
java.lang.String fcName,
java.lang.String rowId,
TColumnTable oldTuple)
|
abstract void |
serializeTupleInsertion(java.sql.Connection con,
java.lang.String fcName,
java.lang.String rowId,
TColumnTable newTuple)
|
abstract void |
serializeTupleModification(java.sql.Connection con,
java.lang.String fcName,
java.lang.String rowId,
TColumnTable oldTuple,
TColumnTable newTuple)
updates Page Class/pages (xml documents) |
protected static java.util.Hashtable |
tupleAsXMLTuple(FragmentSer frag,
TColumnTable tuple)
converts tuple data from TColumn into an
Hashtable containing column description QName
as key, and tuple data as data; |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected static final boolean DEBUG
private static SerializeIncrementalImpl _instance
Constructor Detail |
public SerializeTupleModification()
Method Detail |
public static SerializeTupleModification getInstance()
public abstract 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
oldTuple
and
creating new pages designated by newTuple
con
- Connection handlefc_longName
- name of Fragment Class in which a fragment is updatedoldTuple
- fragmentation parameters of old tuplenewTuple
- fragmentation parameters of new tuplejava.sql.SQLException
- fetching data failedjava.io.IOException
- writing xml document failedorg.xml.sax.SAXException
- creating xml document failedpublic abstract void serializeFragmentInsertion(java.sql.Connection con, java.lang.String fc_longName, TColumnTable newTuple) throws java.sql.SQLException, java.io.IOException, org.xml.sax.SAXException
con
- Connection handlefc_longName
- name of Fragment Class which gains a new fragmentnewTuple
- fragmentation parmeters of new fragmentjava.sql.SQLException
- fetching data failedjava.io.IOException
- writing xml document failedorg.xml.sax.SAXException
- creating xml document failedpublic abstract 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
con
- Connection handlefcName
- name of fragment class relation in which the deletion occuredrowId
- rowid of tuple which was deletedoldTuple
- old tuplejava.io.IOException
- reading/writing xml document failedjava.sql.SQLException
- fetching data failedorg.xml.sax.SAXException
- updating xml document failedpublic abstract 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
con
- Connection handlefcName
- name of fragment class relation in which the update occurredrowId
- rowid of tuple which was insertednewTuple
- new tuplejava.io.IOException
- reading/writing xml document failedjava.sql.SQLException
- fetching data failedorg.xml.sax.SAXException
- updating xml document failedpublic abstract 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
con
- Connection objectfcName
- fragment class name (whose Fragment Class
relation was updated)rowId
- row id from the updated tupleoldTuple
- tuple whose data is replaced by the new tuplenewTuple
- tuple whose data replaces the old tuplejava.io.IOException
- reading / writing xml document failedjava.sql.SQLException
- fetching data failedorg.xml.sax.SAXException
- generating / parsing xml document(s) failedpublic abstract void serializeFragmentDeletion(java.sql.Connection con, java.lang.String fc_longName, TColumnTable oldTuple) throws java.io.IOException, java.sql.SQLException, org.xml.sax.SAXException
con
- Connection handlefc_longName
- name of Fragment Class where a fragment is being deletedoldTuple
- fragmentation parameters for fragment,
which is to be deletedjava.io.IOException
- reading / writing xml document failedjava.sql.SQLException
- fetching data failedorg.xml.sax.SAXException
- generating / parsing xml document(s) failedprotected static java.util.Hashtable getFragmentParameters(java.sql.Connection con, FragmentClassSer fc, TColumnTable tuple) throws java.sql.SQLException
tuple
equals the amount of the fragment class' parameters.con
- Connection handlefc
- fragment classtuple
- tuple whose parameter values are extractedHashtable
, a key corresponds
to a parameter name, and a value to a
parameter's actual value.java.sql.SQLException
- error accessing tuple
objectprotected static java.util.Hashtable tupleAsXMLTuple(FragmentSer frag, TColumnTable tuple) throws java.sql.SQLException
TColumn
into an
Hashtable containing column description QName
as key, and tuple data as data;frag
- fragment class providing namespace for tuple;tuple
- contains tuple description and tuple data;QName
for column as
key and tuple data as datajava.sql.SQLException
- protected static TupleModificationDescr buildModificationDescrObj(FragmentSer frag, java.lang.String rowId, TColumnTable newTuple, int mod) throws java.sql.SQLException
frag
- fragment classrowId
- rowid of tuple which was modificatednewTuple
- new tuplemod
- type of tuple modification (insert, delete, update)java.sql.SQLException
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |