scone.netobjects
Class Server

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

public class Server
extends TableRecord

a Server represents a ServerCache-set from the database

Author:
Harald Weinreich, Volkert Buchmann

Field Summary
static java.lang.String COPYRIGHT
           
protected static DBTableAdapter dbTable
           
 
Fields inherited from class scone.netobjects.TableRecord
ctei, date, fieldValues, hasChanged, hasRecordInDB, persistent
 
Constructor Summary
Server(java.lang.String host)
           
 
Method Summary
 void access()
          sets lastAccess to now and increments accessCounter
if the node is visted for the first time, the method sets firstAccess
 int getAccessCounter()
          Returns the times the node has been accessed by any scone-user
 java.lang.String getAccessStatus()
          Returns the status of the node, for example 200 or 404
if -1 is returned, the node has not yet been visited
 java.lang.String getDelay()
           
 java.lang.String getDescription()
           
 long getFirstAccess()
          Returns the date of the first access of this node.
 java.lang.String getHost()
           
 java.lang.Object getKey(int KeyNo)
          returns the hashkey for this object (to be deprecated!)
 long getLastAccess()
          Returns the date of the last access of this node.
 java.lang.String getTitle()
           
protected  void incAccessCounter()
          Increases the accessCounter.
protected  void setAccessCounter(int v)
          Sets the accesCounter to the specified value.
 void setAccessStatus(java.lang.String v)
          Sets the status of the node, if the status has been -1 and is now changed, firstAccess is set
 void setDelay(java.lang.String v)
           
 void setDescription(java.lang.String v)
           
protected  void setLastAccess(long v)
          Sets the date of the last access (the current access!)
 void setTitle(java.lang.String v)
           
 void store()
          writes a persistent representation of the object to the storage.
 
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
Constructor Detail

Server

public Server(java.lang.String host)
Method Detail

getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String v)

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String v)

getDelay

public java.lang.String getDelay()

setDelay

public void setDelay(java.lang.String v)

access

public void access()
sets lastAccess to now and increments accessCounter
if the node is visted for the first time, the method sets firstAccess


getHost

public java.lang.String getHost()

getAccessStatus

public java.lang.String getAccessStatus()
Returns the status of the node, for example 200 or 404
if -1 is returned, the node has not yet been visited

Returns:
the status, or -1 if no status is available

setAccessStatus

public void setAccessStatus(java.lang.String v)
Sets the status of the node, if the status has been -1 and is now changed, firstAccess is set

Parameters:
v - the status

getFirstAccess

public long getFirstAccess()
Returns the date of the first access of this node.
Be sure that this node has been accessed before this date is used!

Returns:
the date of the first access

getLastAccess

public long getLastAccess()
Returns the date of the last access of this node.
Be sure that this node has been accessed before this date is used!

Returns:
the date of the last access

setLastAccess

protected void setLastAccess(long v)
Sets the date of the last access (the current access!) of the node.
Use access() instead for consistency!

Parameters:
v - the date

getAccessCounter

public int getAccessCounter()
Returns the times the node has been accessed by any scone-user

Returns:
the times the node has been accessed

setAccessCounter

protected void setAccessCounter(int v)
Sets the accesCounter to the specified value.
Use incAccessCounter() instead for consistency!

Parameters:
v - the date

incAccessCounter

protected void incAccessCounter()
Increases the accessCounter.
Use access() instead for consistency!


store

public void store()
Description copied from interface: Cacheable
writes a persistent representation of the object to the storage. For example the scone database.


getKey

public java.lang.Object getKey(int KeyNo)
Description copied from interface: Cacheable
returns the hashkey for this object (to be deprecated!)

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.