net.sourceforge.fixagora.basis.server.control
Class BasisPersistenceHandler

java.lang.Object
  extended by net.sourceforge.fixagora.basis.server.control.BasisPersistenceHandler

public class BasisPersistenceHandler
extends java.lang.Object

The Class BasisPersistenceHandler.


Constructor Summary
BasisPersistenceHandler()
          Instantiates a new basis persistence handler.
 
Method Summary
 void close()
          Close.
<T extends PersistenceInterface>
java.util.List<T>
executeQuery(java.lang.Class<T> clazz, java.lang.String queryString, java.util.List<java.lang.Object> parameterList, TransientValueSetter transientValueSetter, boolean makeEager)
          Execute query.
<T extends PersistenceInterface>
java.util.List<T>
executeQuery(java.lang.Class<T> clazz, java.lang.String queryString, java.lang.Object parameter, TransientValueSetter transientValueSetter, boolean makeEager)
          Execute query.
<T extends PersistenceInterface>
java.util.List<T>
executeQuery(java.lang.Class<T> clazz, java.lang.String queryString, TransientValueSetter transientValueSetter, boolean makeEager)
          Execute query.
<T> T
findById(java.lang.Class<T> clazz, long id, TransientValueSetter transientValueSetter)
          Find by id.
<T> T
findByName(java.lang.Class<T> clazz, java.lang.String name, TransientValueSetter transientValueSetter)
          Find by name.
 long getId(java.lang.String name)
          Gets the id.
 java.util.List<LogEntry> getLogEntries()
          Gets the log entries.
 java.util.Set<SpreadSheetCellContent> getSpreadSheetCellContents(long id)
          Gets the spread sheet cell contents.
 java.util.Set<SpreadSheetCellFormat> getSpreadSheetCellFormats(long id)
          Gets the spread sheet cell formats.
 java.util.Set<SpreadSheetColumnFormat> getSpreadSheetColumnFormats(long id)
          Gets the spread sheet column formats.
 java.util.Set<SpreadSheetConditionalFormat> getSpreadSheetConditionalFormats(long id)
          Gets the spread sheet conditional formats.
 java.util.Set<SpreadSheetRowFormat> getSpreadSheetRowFormats(long id)
          Gets the spread sheet row formats.
 FUser getUser(org.jboss.netty.channel.Channel channel)
          Gets the user.
 boolean isUserOnline(FUser fUser)
          Checks if is user online.
 boolean nameCheck(UniqueNameRequest uniqueNameRequest)
          Name check.
 void persist(AbstractBusinessObject abstractBusinessObject, org.jboss.netty.channel.Channel channel, TransientValueSetter transientValueSetter)
          Persist.
 void persist(java.lang.Object object)
          Persist.
 void processLogEntries(java.util.List<LogEntry> logEntries)
          Process log entries.
 java.util.Set<AbstractBusinessObject> remove(java.util.Set<AbstractBusinessObject> abstractBusinessObjects, org.jboss.netty.channel.Channel channel)
          Removes the.
 void removeObject(java.lang.Object object)
          Removes the object.
 void removeSession(org.jboss.netty.channel.Channel channel, TransientValueSetter transientValueSetter)
          Removes the session.
 boolean securityIDCheck(UniqueSecurityIDRequest uniqueSecurityIDRequest)
          Security id check.
 void send(AbstractResponse abstractResponse)
          Send.
 void send(AbstractResponse abstractResponse, org.jboss.netty.channel.Channel channel)
          Send.
 void setBasisClientAcceptor(FBasisClientAcceptor fBasisClientAcceptor)
          Sets the basis client acceptor.
 boolean setUser(FUser fUser, org.jboss.netty.channel.Channel session, TransientValueSetter transientValueSetter)
          Sets the user.
 java.util.List<AbstractBusinessObject> update(java.util.List<AbstractBusinessObject> abstractBusinessObjects, org.jboss.netty.channel.Channel channel, TransientValueSetter transientValueSetter, boolean writeLogEntry)
          Update.
 void update(java.lang.Object object)
          Update.
 void updateSpreadSheetCellContent(java.util.List<SpreadSheetCellContent> sheetCellContents)
          Update spread sheet cell content.
 void updateSpreadSheetCellFormat(SpreadSheetCellFormat spreadSheetCellFormat)
          Update spread sheet cell format.
 void updateSpreadSheetColumnFormat(SpreadSheetColumnFormat spreadSheetColumnFormat)
          Update spread sheet column format.
 void updateSpreadSheetConditionalFormat(SpreadSheetConditionalFormat spreadSheetConditionalFormat)
          Update spread sheet conditional format.
 void updateSpreadSheetRowFormat(SpreadSheetRowFormat spreadSheetRowFormat)
          Update spread sheet row format.
 void writeLogEntry(LogEntry logEntry)
          Write log entry.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasisPersistenceHandler

public BasisPersistenceHandler()
Instantiates a new basis persistence handler.

Method Detail

persist

public void persist(AbstractBusinessObject abstractBusinessObject,
                    org.jboss.netty.channel.Channel channel,
                    TransientValueSetter transientValueSetter)
             throws java.lang.Exception
Persist.

Parameters:
abstractBusinessObject - the abstract business object
channel - the channel
transientValueSetter - the transient value setter
Throws:
java.lang.Exception - the exception

persist

public void persist(java.lang.Object object)
             throws java.lang.Exception
Persist.

Parameters:
object - the object
Throws:
java.lang.Exception - the exception

update

public void update(java.lang.Object object)
            throws java.lang.Exception
Update.

Parameters:
object - the object
Throws:
java.lang.Exception - the exception

removeObject

public void removeObject(java.lang.Object object)
                  throws java.lang.Exception
Removes the object.

Parameters:
object - the object
Throws:
java.lang.Exception - the exception

findByName

public <T> T findByName(java.lang.Class<T> clazz,
                        java.lang.String name,
                        TransientValueSetter transientValueSetter)
Find by name.

Type Parameters:
T - the generic type
Parameters:
clazz - the clazz
name - the name
transientValueSetter - the transient value setter
Returns:
the t

findById

public <T> T findById(java.lang.Class<T> clazz,
                      long id,
                      TransientValueSetter transientValueSetter)
Find by id.

Type Parameters:
T - the generic type
Parameters:
clazz - the clazz
id - the id
transientValueSetter - the transient value setter
Returns:
the t

executeQuery

public <T extends PersistenceInterface> java.util.List<T> executeQuery(java.lang.Class<T> clazz,
                                                                       java.lang.String queryString,
                                                                       TransientValueSetter transientValueSetter,
                                                                       boolean makeEager)
Execute query.

Type Parameters:
T - the generic type
Parameters:
clazz - the clazz
queryString - the query string
transientValueSetter - the transient value setter
makeEager - the make eager
Returns:
the list

executeQuery

public <T extends PersistenceInterface> java.util.List<T> executeQuery(java.lang.Class<T> clazz,
                                                                       java.lang.String queryString,
                                                                       java.lang.Object parameter,
                                                                       TransientValueSetter transientValueSetter,
                                                                       boolean makeEager)
Execute query.

Type Parameters:
T - the generic type
Parameters:
clazz - the clazz
queryString - the query string
parameter - the parameter
transientValueSetter - the transient value setter
makeEager - the make eager
Returns:
the list

executeQuery

public <T extends PersistenceInterface> java.util.List<T> executeQuery(java.lang.Class<T> clazz,
                                                                       java.lang.String queryString,
                                                                       java.util.List<java.lang.Object> parameterList,
                                                                       TransientValueSetter transientValueSetter,
                                                                       boolean makeEager)
Execute query.

Type Parameters:
T - the generic type
Parameters:
clazz - the clazz
queryString - the query string
parameterList - the parameter list
transientValueSetter - the transient value setter
makeEager - the make eager
Returns:
the list

close

public void close()
Close.


setBasisClientAcceptor

public void setBasisClientAcceptor(FBasisClientAcceptor fBasisClientAcceptor)
Sets the basis client acceptor.

Parameters:
fBasisClientAcceptor - the new basis client acceptor

processLogEntries

public void processLogEntries(java.util.List<LogEntry> logEntries)
Process log entries.

Parameters:
logEntries - the log entries

writeLogEntry

public void writeLogEntry(LogEntry logEntry)
Write log entry.

Parameters:
logEntry - the log entry

nameCheck

public boolean nameCheck(UniqueNameRequest uniqueNameRequest)
Name check.

Parameters:
uniqueNameRequest - the unique name request
Returns:
true, if successful

securityIDCheck

public boolean securityIDCheck(UniqueSecurityIDRequest uniqueSecurityIDRequest)
Security id check.

Parameters:
uniqueSecurityIDRequest - the unique security id request
Returns:
true, if successful

update

public java.util.List<AbstractBusinessObject> update(java.util.List<AbstractBusinessObject> abstractBusinessObjects,
                                                     org.jboss.netty.channel.Channel channel,
                                                     TransientValueSetter transientValueSetter,
                                                     boolean writeLogEntry)
Update.

Parameters:
abstractBusinessObjects - the abstract business objects
channel - the channel
transientValueSetter - the transient value setter
writeLogEntry - the write log entry
Returns:
the list

setUser

public boolean setUser(FUser fUser,
                       org.jboss.netty.channel.Channel session,
                       TransientValueSetter transientValueSetter)
Sets the user.

Parameters:
fUser - the f user
session - the session
transientValueSetter - the transient value setter
Returns:
true, if successful

isUserOnline

public boolean isUserOnline(FUser fUser)
Checks if is user online.

Parameters:
fUser - the f user
Returns:
true, if is user online

removeSession

public void removeSession(org.jboss.netty.channel.Channel channel,
                          TransientValueSetter transientValueSetter)
Removes the session.

Parameters:
channel - the channel
transientValueSetter - the transient value setter

remove

public java.util.Set<AbstractBusinessObject> remove(java.util.Set<AbstractBusinessObject> abstractBusinessObjects,
                                                    org.jboss.netty.channel.Channel channel)
Removes the.

Parameters:
abstractBusinessObjects - the abstract business objects
channel - the channel
Returns:
the sets the

getLogEntries

public java.util.List<LogEntry> getLogEntries()
Gets the log entries.

Returns:
the log entries

updateSpreadSheetCellContent

public void updateSpreadSheetCellContent(java.util.List<SpreadSheetCellContent> sheetCellContents)
Update spread sheet cell content.

Parameters:
sheetCellContents - the sheet cell contents

getSpreadSheetCellContents

public java.util.Set<SpreadSheetCellContent> getSpreadSheetCellContents(long id)
Gets the spread sheet cell contents.

Parameters:
id - the id
Returns:
the spread sheet cell contents

updateSpreadSheetCellFormat

public void updateSpreadSheetCellFormat(SpreadSheetCellFormat spreadSheetCellFormat)
Update spread sheet cell format.

Parameters:
spreadSheetCellFormat - the spread sheet cell format

getSpreadSheetCellFormats

public java.util.Set<SpreadSheetCellFormat> getSpreadSheetCellFormats(long id)
Gets the spread sheet cell formats.

Parameters:
id - the id
Returns:
the spread sheet cell formats

updateSpreadSheetColumnFormat

public void updateSpreadSheetColumnFormat(SpreadSheetColumnFormat spreadSheetColumnFormat)
Update spread sheet column format.

Parameters:
spreadSheetColumnFormat - the spread sheet column format

getSpreadSheetColumnFormats

public java.util.Set<SpreadSheetColumnFormat> getSpreadSheetColumnFormats(long id)
Gets the spread sheet column formats.

Parameters:
id - the id
Returns:
the spread sheet column formats

updateSpreadSheetRowFormat

public void updateSpreadSheetRowFormat(SpreadSheetRowFormat spreadSheetRowFormat)
Update spread sheet row format.

Parameters:
spreadSheetRowFormat - the spread sheet row format

getSpreadSheetRowFormats

public java.util.Set<SpreadSheetRowFormat> getSpreadSheetRowFormats(long id)
Gets the spread sheet row formats.

Parameters:
id - the id
Returns:
the spread sheet row formats

updateSpreadSheetConditionalFormat

public void updateSpreadSheetConditionalFormat(SpreadSheetConditionalFormat spreadSheetConditionalFormat)
Update spread sheet conditional format.

Parameters:
spreadSheetConditionalFormat - the spread sheet conditional format

getSpreadSheetConditionalFormats

public java.util.Set<SpreadSheetConditionalFormat> getSpreadSheetConditionalFormats(long id)
Gets the spread sheet conditional formats.

Parameters:
id - the id
Returns:
the spread sheet conditional formats

getUser

public FUser getUser(org.jboss.netty.channel.Channel channel)
Gets the user.

Parameters:
channel - the channel
Returns:
the user

getId

public long getId(java.lang.String name)
Gets the id.

Parameters:
name - the name
Returns:
the id

send

public void send(AbstractResponse abstractResponse,
                 org.jboss.netty.channel.Channel channel)
Send.

Parameters:
abstractResponse - the abstract response
channel - the channel

send

public void send(AbstractResponse abstractResponse)
Send.

Parameters:
abstractResponse - the abstract response