com.tootsville.sys.op
Class ModeratorJournal

java.lang.Object
  extended by org.starhope.appius.sql.SQLPeerDatum
      extended by com.tootsville.sys.op.ModeratorJournal
All Implemented Interfaces:
Serializable, Comparable<Object>

Deprecated.

@Deprecated
public class ModeratorJournal
extends SQLPeerDatum

Moderator journal is a one time entry that can be added using an extension command or by any system processes. The only step required is created a new instance. The data provided will be parsed and formatted then stored in the database. Retrieving the data will create all the required information. Potential upgrade is to use a configuration file to format the output when retrieving the entry. Example of this is that in Joshua references to usernames can be returned in the entry as anchor links to a user profile.

DOES NOT WORK. NEVER HAS.

Author:
Tim Heys
See Also:
Serialized Form

Field Summary
private  int authorID
          Deprecated. User ID of the author
private  String entryText
          Deprecated. Text entered into the entry
private  int id
          Deprecated. ID of the journal entry
private  HashMap<Integer,String> references
          Deprecated. Refences to users made in the shift journal.
private static long serialVersionUID
          Deprecated. Generated serialization ID
private  Timestamp stamp
          Deprecated. Timestamp of when the post was created.
 
Constructor Summary
ModeratorJournal(AbstractUser author, String entry)
          Deprecated.  twheys@gmail.com Jan 28, 2010
ModeratorJournal(ResultSet rs)
          Deprecated.  twheys@gmail.com Jan 28, 2010
 
Method Summary
private  void checkReferencePossibility(String possibleUser)
          Deprecated.  twheys@gmail.com Jan 28, 2010
 void flush()
          Deprecated. Don't use, moderator journals are never updated.
 int getAuthorID()
          Deprecated.  
protected  String getCacheUniqueID()
          Deprecated.  
 String getEntryText()
          Deprecated.  
 int getId()
          Deprecated.  
static ModeratorJournal getJournalByID(int idToGet)
          Deprecated.  twheys@gmail.com Jan 28, 2010
 HashMap<Integer,String> getReferences()
          Deprecated.  
 Timestamp getStamp()
          Deprecated.  
private  void initReferencesForThis()
          Deprecated.  twheys@gmail.com Jan 28, 2010
private  void insert()
          Deprecated.  twheys@gmail.com Jan 28, 2010
private  void insertReferences()
          Deprecated.  twheys@gmail.com Jan 28, 2010
private  void parseReferences()
          Deprecated.  twheys@gmail.com Jan 28, 2010
protected  void set(ResultSet rs)
          Deprecated.  
 void setAuthorID(int newAuthor)
          Deprecated.  
 void setEntryText(String newEntry)
          Deprecated.  
 void setId(int newID)
          Deprecated.  
 void setReferences(HashMap<Integer,String> newReferences)
          Deprecated.  
protected  void setReferences(ResultSet rs)
          Deprecated.  twheys@gmail.com Jan 28, 2010
 void setStamp(Timestamp newStamp)
          Deprecated.  
 
Methods inherited from class org.starhope.appius.sql.SQLPeerDatum
changed, compareTo, findInCache, saveInCache, set, toJSON
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Deprecated. 
Generated serialization ID

See Also:
Constant Field Values

authorID

private int authorID
Deprecated. 
User ID of the author

See Also:
User

entryText

private String entryText
Deprecated. 
Text entered into the entry


id

private int id
Deprecated. 
ID of the journal entry


references

private HashMap<Integer,String> references
Deprecated. 
Refences to users made in the shift journal. This is accomplished by entering an "@username" into the entry.


stamp

private Timestamp stamp
Deprecated. 
Timestamp of when the post was created.

Constructor Detail

ModeratorJournal

public ModeratorJournal(AbstractUser author,
                        String entry)
Deprecated. 
 twheys@gmail.com Jan 28, 2010
 
A ModeratorJournal creates an new object of a moderator journal, parses the entry for references, then

Parameters:
author - WRITEME
entry - WRITEME

ModeratorJournal

public ModeratorJournal(ResultSet rs)
Deprecated. 
 twheys@gmail.com Jan 28, 2010
 
A ModeratorJournal created from a result set.

Parameters:
rs - the result set from a SELECT statment
Method Detail

getJournalByID

public static ModeratorJournal getJournalByID(int idToGet)
                                       throws NotFoundException
Deprecated. 
 twheys@gmail.com Jan 28, 2010
 
TO getJournalByID SELECT from database on ID and build from result set.

Parameters:
idToGet - the ID of the moderator journal entry to retrieve
Returns:
a Moderator Journal with the ID idToGet
Throws:
NotFoundException - if no journal exists with the ID idToGet

checkReferencePossibility

private void checkReferencePossibility(String possibleUser)
Deprecated. 
 twheys@gmail.com Jan 28, 2010
 
TO checkReferencePossibility try to get a user ID for a userName, if successful add to references.

Parameters:
possibleUser - the username being checked

flush

public void flush()
Deprecated. 
Don't use, moderator journals are never updated. Throws fatal bug.

Specified by:
flush in class SQLPeerDatum
See Also:
SQLPeerDatum.flush()

getAuthorID

public int getAuthorID()
Deprecated. 
Returns:
the authorID

getCacheUniqueID

protected String getCacheUniqueID()
Deprecated. 
Specified by:
getCacheUniqueID in class SQLPeerDatum
Returns:
The local (Stringified) version of an unique ID; usually the database ID column
See Also:
SQLPeerDatum.getCacheUniqueID()

getEntryText

public String getEntryText()
Deprecated. 
Returns:
the entryText

getId

public int getId()
Deprecated. 
Returns:
the id

getReferences

public HashMap<Integer,String> getReferences()
Deprecated. 
Returns:
the references

getStamp

public Timestamp getStamp()
Deprecated. 
Returns:
the stamp

initReferencesForThis

private void initReferencesForThis()
Deprecated. 
 twheys@gmail.com Jan 28, 2010
 
TO getReferencesForThis SELECT references with the journalID that matches the ID of this journal entry.


insert

private void insert()
Deprecated. 
 twheys@gmail.com Jan 28, 2010
 
TO insert insert into moderatorJournal with the members of this instance.


insertReferences

private void insertReferences()
                       throws SQLException
Deprecated. 
 twheys@gmail.com Jan 28, 2010
 
TO insertReferences WRITEME...

Throws:
SQLException - WRITEME

parseReferences

private void parseReferences()
Deprecated. 
 twheys@gmail.com Jan 28, 2010
 
TO parseReferences scan through the entry looking for "@username" entries.


set

protected void set(ResultSet rs)
            throws SQLException
Deprecated. 
Specified by:
set in class SQLPeerDatum
Parameters:
rs - The result of an SQL query, with the cursor already pointed at the row describing this specific instance of the object.
Throws:
SQLException - if the database fails somehow
See Also:
SQLPeerDatum.set(java.sql.ResultSet)

setAuthorID

public void setAuthorID(int newAuthor)
Deprecated. 
Parameters:
newAuthor - the authorID to set

setEntryText

public void setEntryText(String newEntry)
Deprecated. 
Parameters:
newEntry - the entryText to set

setId

public void setId(int newID)
Deprecated. 
Parameters:
newID - the id to set

setReferences

public void setReferences(HashMap<Integer,String> newReferences)
Deprecated. 
Parameters:
newReferences - the references to set

setReferences

protected void setReferences(ResultSet rs)
                      throws SQLException
Deprecated. 
 twheys@gmail.com Jan 28, 2010
 
TO set_References WRITEME...

Parameters:
rs - WRITEME
Throws:
SQLException - WRITEME

setStamp

public void setStamp(Timestamp newStamp)
Deprecated. 
Parameters:
newStamp - the stamp to set