scone.netobjects
Class Inclusion

java.lang.Object
  extended by scone.netobjects.TableRecord
      extended by scone.netobjects.Inclusion
All Implemented Interfaces:
Cacheable

public class Inclusion
extends TableRecord

An Inclusion represents the objects included in one web page, like applets, pictures etc.

Author:
Harald Weinreich, Volkert Buchmann

Field Summary
protected  NetNode childNode
           
static java.lang.String COPYRIGHT
           
protected static DBTableAdapter dbTable
           
protected  NetNode parentNode
           
 
Fields inherited from class scone.netobjects.TableRecord
ctei, date, fieldValues, hasChanged, hasRecordInDB, persistent
 
Constructor Summary
  Inclusion()
           
protected Inclusion(NetNode parent, NetNode child)
          Creates a new Inclusion object.
  Inclusion(java.sql.ResultSet results)
          Create Inclusion object to result of a DB-Query.
  Inclusion(java.lang.String inclusionId)
          Create a new Inclusion object.
 
Method Summary
 NetNode getChildNode()
          returns the included node
 java.lang.String getChildNodeId()
          returns the included nodeId
 java.lang.String getInclusionId()
          returns the id of the Inclusion
 java.lang.String getInfo()
          returns some info to the tag.
 java.lang.Object getKey(int KeyNo)
          Returns the key(s)
 NetNode getParentNode()
          returns the Node where the inclusion is defined
 java.lang.String getParentNodeId()
          returns the id of the Node where the inclusion is defined
 java.lang.String getTag()
          returns the name of the tag which defined the inclusion
 void setInfo(java.lang.String i)
          sets info to the tag which defined the inclusion
 void setTag(java.lang.String tag)
          sets the name of the tag which defined the inclusion
 void store()
          Store Inclusion to DB
For performance reasons, inclusion objects can be created without corresponding DB entry!
 
Methods inherited from class scone.netobjects.TableRecord
isPersistent, now, setCacheTableEntryInterface, setChanged, setPersistent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

dbTable

protected static DBTableAdapter dbTable

parentNode

protected NetNode parentNode

childNode

protected NetNode childNode
Constructor Detail

Inclusion

public Inclusion()

Inclusion

public Inclusion(java.lang.String inclusionId)
Create a new Inclusion object. The constructor tries to read a Inclusion set from the scone database, identified by the inclusionId. If such a set already exists, the values are read from the database. Else, hasRecordInDB is set to false

Parameters:
inclusionId - the id of the inclusion.

Inclusion

protected Inclusion(NetNode parent,
                    NetNode child)
Creates a new Inclusion object. The constructor tries to read a Inclusion set from the scone database, this is identified by the inclusionId. If such a set already exists, the values are read from the database. Else, hasRecordInDB is set to false. Therfore store() creates OR updates the DB entry.

Parameters:
parent - the NetNode of the document that embeds an other NetObject.
child - the NetNode of the embedded object.

Inclusion

public Inclusion(java.sql.ResultSet results)
Create Inclusion object to result of a DB-Query.

Parameters:
results - the ResultSet returnetd by the query.
Method Detail

getInclusionId

public java.lang.String getInclusionId()
returns the id of the Inclusion

Returns:
the inclusionId

getParentNodeId

public java.lang.String getParentNodeId()
returns the id of the Node where the inclusion is defined

Returns:
the nodeId of the parent node

getParentNode

public NetNode getParentNode()
returns the Node where the inclusion is defined

Returns:
the node where the inclusion is defined

getChildNodeId

public java.lang.String getChildNodeId()
returns the included nodeId

Returns:
the inculded nodeId

getChildNode

public NetNode getChildNode()
returns the included node

Returns:
the included node

getTag

public java.lang.String getTag()
returns the name of the tag which defined the inclusion

Returns:
the name of the tag

setTag

public void setTag(java.lang.String tag)
sets the name of the tag which defined the inclusion

Parameters:
tag - the name of the tag

getInfo

public java.lang.String getInfo()
returns some info to the tag. See Parsingmeg for more details...

Returns:
info to the inclusion (like alt to image etc.)

setInfo

public void setInfo(java.lang.String i)
sets info to the tag which defined the inclusion

Parameters:
i - info to the tag

store

public void store()
Store Inclusion to DB
For performance reasons, inclusion objects can be created without corresponding DB entry! Therefore store() can also create new DB entries.


getKey

public java.lang.Object getKey(int KeyNo)
Returns the key(s)

Specified by:
getKey in interface Cacheable
Specified by:
getKey in class TableRecord
Parameters:
KeyNo - the number of the key to be generated
Returns:
the Key(s) corresponding to the object.