net.anotheria.moskitodemo.sqltrace.persistence
Class CommentDAO

java.lang.Object
  extended by net.anotheria.moskitodemo.sqltrace.persistence.CommentDAO
All Implemented Interfaces:
net.anotheria.db.dao.DAO

public class CommentDAO
extends Object
implements net.anotheria.db.dao.DAO


Field Summary
static String ATT_NAME_EMAIL
           
static String ATT_NAME_FIRSTNAME
           
static String ATT_NAME_ID
           
static String ATT_NAME_LASTNAME
           
static String ATT_NAME_TEXT
           
static String ATT_NAME_TIMESTAMP
           
static String ATT_NAME_WISHESUPDATES
           
static String SQL_COUNT_1
           
static String SQL_CREATE_1
           
static String SQL_CREATE_2
           
static String SQL_DELETE_1
           
static String SQL_DELETE_2
           
static String SQL_LIMIT_1
           
static String SQL_OFFSET_1
           
static String SQL_READ_ALL_1
           
static String SQL_READ_ALL_2
           
static String SQL_READ_ALL_BY_PROPERTY_1
           
static String SQL_READ_ALL_BY_PROPERTY_2
           
static String SQL_READ_ONE_1
           
static String SQL_READ_ONE_2
           
static String SQL_UPDATE_1
           
static String SQL_UPDATE_2
           
static String TABNAME
           
 
Fields inherited from interface net.anotheria.db.dao.DAO
ATT_NAME_DAO_CREATED, ATT_NAME_DAO_UPDATED
 
Constructor Summary
CommentDAO()
           
 
Method Summary
 Comment createComment(Connection con, Comment comment)
          Creates a new Comment object.
 List<Comment> createComments(Connection con, List<Comment> list)
          Creates multiple new Comment objects.
 void createStructure(Connection connection)
           
 void deleteComment(Connection con, String id)
          Deletes a Comment object by id.
 void deleteComments(Connection con, List<Comment> list)
          Deletes multiple Comment objects.
 void deleteStructure(Connection connection)
           
 Comment getComment(Connection con, String id)
          Returns the Comment object with the specified id.
 List<Comment> getComments(Connection con)
          Returns all Comments objects stored.
 List<Comment> getComments(Connection con, net.anotheria.util.slicer.Segment aSegment)
          Returns Comments objects segment.
 List<Comment> getCommentsByProperty(Connection con, List<QueryProperty> properties)
          Returns all Comments objects stored which matches given properties.
 List<Comment> getCommentsByProperty(Connection con, net.anotheria.util.slicer.Segment aSegment, List<QueryProperty> properties)
          Returns Comments objects segment which matches given properties.
 int getCommentsCount(Connection con)
          Returns Comments objects count.
 Comment importComment(Connection con, Comment comment)
          Imports a new Comment object.
 List<Comment> importComments(Connection con, List<Comment> list)
          Imports multiple new Comment objects.
 void init(Connection con)
           
 Comment updateComment(Connection con, Comment comment)
          Updates a Comment object.
 List<Comment> updateComments(Connection con, List<Comment> list)
          Updates multiple new Comment objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABNAME

public static final String TABNAME
See Also:
Constant Field Values

ATT_NAME_ID

public static final String ATT_NAME_ID
See Also:
Constant Field Values

ATT_NAME_FIRSTNAME

public static final String ATT_NAME_FIRSTNAME
See Also:
Constant Field Values

ATT_NAME_LASTNAME

public static final String ATT_NAME_LASTNAME
See Also:
Constant Field Values

ATT_NAME_EMAIL

public static final String ATT_NAME_EMAIL
See Also:
Constant Field Values

ATT_NAME_TEXT

public static final String ATT_NAME_TEXT
See Also:
Constant Field Values

ATT_NAME_TIMESTAMP

public static final String ATT_NAME_TIMESTAMP
See Also:
Constant Field Values

ATT_NAME_WISHESUPDATES

public static final String ATT_NAME_WISHESUPDATES
See Also:
Constant Field Values

SQL_CREATE_1

public static final String SQL_CREATE_1
See Also:
Constant Field Values

SQL_CREATE_2

public static final String SQL_CREATE_2
See Also:
Constant Field Values

SQL_UPDATE_1

public static final String SQL_UPDATE_1
See Also:
Constant Field Values

SQL_UPDATE_2

public static final String SQL_UPDATE_2
See Also:
Constant Field Values

SQL_DELETE_1

public static final String SQL_DELETE_1
See Also:
Constant Field Values

SQL_DELETE_2

public static final String SQL_DELETE_2
See Also:
Constant Field Values

SQL_READ_ONE_1

public static final String SQL_READ_ONE_1
See Also:
Constant Field Values

SQL_READ_ONE_2

public static final String SQL_READ_ONE_2
See Also:
Constant Field Values

SQL_READ_ALL_1

public static final String SQL_READ_ALL_1
See Also:
Constant Field Values

SQL_READ_ALL_2

public static final String SQL_READ_ALL_2
See Also:
Constant Field Values

SQL_READ_ALL_BY_PROPERTY_1

public static final String SQL_READ_ALL_BY_PROPERTY_1
See Also:
Constant Field Values

SQL_READ_ALL_BY_PROPERTY_2

public static final String SQL_READ_ALL_BY_PROPERTY_2
See Also:
Constant Field Values

SQL_COUNT_1

public static final String SQL_COUNT_1
See Also:
Constant Field Values

SQL_LIMIT_1

public static final String SQL_LIMIT_1
See Also:
Constant Field Values

SQL_OFFSET_1

public static final String SQL_OFFSET_1
See Also:
Constant Field Values
Constructor Detail

CommentDAO

public CommentDAO()
Method Detail

getComments

public List<Comment> getComments(Connection con)
                          throws net.anotheria.db.dao.DAOException
Returns all Comments objects stored.

Throws:
net.anotheria.db.dao.DAOException

deleteComment

public void deleteComment(Connection con,
                          String id)
                   throws net.anotheria.db.dao.DAOException
Deletes a Comment object by id.

Throws:
net.anotheria.db.dao.DAOException

deleteComments

public void deleteComments(Connection con,
                           List<Comment> list)
                    throws net.anotheria.db.dao.DAOException
Deletes multiple Comment objects.

Throws:
net.anotheria.db.dao.DAOException

getComment

public Comment getComment(Connection con,
                          String id)
                   throws net.anotheria.db.dao.DAOException
Returns the Comment object with the specified id.

Throws:
net.anotheria.db.dao.DAOException

importComment

public Comment importComment(Connection con,
                             Comment comment)
                      throws net.anotheria.db.dao.DAOException
Imports a new Comment object. Returns the imported version.

Throws:
net.anotheria.db.dao.DAOException

importComments

public List<Comment> importComments(Connection con,
                                    List<Comment> list)
                             throws net.anotheria.db.dao.DAOException
Imports multiple new Comment objects. Returns the imported versions.

Throws:
net.anotheria.db.dao.DAOException

createComment

public Comment createComment(Connection con,
                             Comment comment)
                      throws net.anotheria.db.dao.DAOException
Creates a new Comment object. Returns the created version.

Throws:
net.anotheria.db.dao.DAOException

createComments

public List<Comment> createComments(Connection con,
                                    List<Comment> list)
                             throws net.anotheria.db.dao.DAOException
Creates multiple new Comment objects. Returns the created versions.

Throws:
net.anotheria.db.dao.DAOException

updateComment

public Comment updateComment(Connection con,
                             Comment comment)
                      throws net.anotheria.db.dao.DAOException
Updates a Comment object. Returns the updated version.

Throws:
net.anotheria.db.dao.DAOException

updateComments

public List<Comment> updateComments(Connection con,
                                    List<Comment> list)
                             throws net.anotheria.db.dao.DAOException
Updates multiple new Comment objects. Returns the updated versions.

Throws:
net.anotheria.db.dao.DAOException

getCommentsByProperty

public List<Comment> getCommentsByProperty(Connection con,
                                           List<QueryProperty> properties)
                                    throws net.anotheria.db.dao.DAOException
Returns all Comments objects stored which matches given properties.

Throws:
net.anotheria.db.dao.DAOException

getCommentsCount

public int getCommentsCount(Connection con)
                     throws net.anotheria.db.dao.DAOException
Returns Comments objects count.

Throws:
net.anotheria.db.dao.DAOException

getComments

public List<Comment> getComments(Connection con,
                                 net.anotheria.util.slicer.Segment aSegment)
                          throws net.anotheria.db.dao.DAOException
Returns Comments objects segment.

Throws:
net.anotheria.db.dao.DAOException

getCommentsByProperty

public List<Comment> getCommentsByProperty(Connection con,
                                           net.anotheria.util.slicer.Segment aSegment,
                                           List<QueryProperty> properties)
                                    throws net.anotheria.db.dao.DAOException
Returns Comments objects segment which matches given properties.

Throws:
net.anotheria.db.dao.DAOException

createStructure

public void createStructure(Connection connection)
                     throws net.anotheria.db.dao.DAOException
Specified by:
createStructure in interface net.anotheria.db.dao.DAO
Throws:
net.anotheria.db.dao.DAOException

deleteStructure

public void deleteStructure(Connection connection)
                     throws net.anotheria.db.dao.DAOException
Specified by:
deleteStructure in interface net.anotheria.db.dao.DAO
Throws:
net.anotheria.db.dao.DAOException

init

public void init(Connection con)
          throws net.anotheria.db.dao.DAOException
Throws:
net.anotheria.db.dao.DAOException


Copyright © 2010-2012 anotheria.net. All Rights Reserved.