com.solidstategroup.sitetracker.data
Class PageVisitHome
java.lang.Object
com.solidstategroup.data.DataAccess
com.solidstategroup.data.FilteredDataAccess
com.solidstategroup.sitetracker.data.PageVisitHome
public class PageVisitHome
- extends FilteredDataAccess
User: Phil
Date: 21-Mar-2005
Time: 18:05:15
|
Constructor Summary |
PageVisitHome(java.sql.Connection connection)
|
|
Method Summary |
protected java.util.Collection |
configFilter(DataFilter filter,
java.lang.StringBuffer stmt)
Builds up the SQL statement for extracting PageVisits based on the Filter |
java.lang.Object |
extractData(java.sql.ResultSet rs)
Helper method to create PageVisit Objects from a results set |
java.util.Collection |
findPopularReferers(int id,
int limit,
int refererType)
creates a collection of PopulatPageObjs and the amount of clicks to them from a referering Page
can be limited to just pulling back the most popular - say top 5 |
protected java.lang.String |
getSelectByRow()
|
protected java.lang.String |
getSelectCount()
|
void |
injectData(java.sql.ResultSet rs,
PageVisit pageVisit)
Different to extract data as is will not create a new Object but rather inject into an existing one |
static void |
main(java.lang.String[] args)
|
java.util.Collection |
reports(PageVisitFilter pFilter)
|
void |
update(PageVisit pageVisit)
updates the pagevisit just setting the fields that are not already set by the |
| Methods inherited from class com.solidstategroup.data.DataAccess |
createEqualClause, createGreaterClause, createGreaterEqualClause, createInClause, createInt, createLessClause, createLessEqualClause, createLikeClause, findByPrimaryKey, getConnection, getCount, getDate, getInt, getResultSet, getRows, insertSql, setConnection, setDate, setInt, updateSql |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE_REFERER_UNKNOWN
public static final int TYPE_REFERER_UNKNOWN
- See Also:
- Constant Field Values
TYPE_REFERER_ROOT_ARTICLE_ID
public static final int TYPE_REFERER_ROOT_ARTICLE_ID
- See Also:
- Constant Field Values
TYPE_REFERER_ROOT_ARTICLE_TYPE_ID
public static final int TYPE_REFERER_ROOT_ARTICLE_TYPE_ID
- See Also:
- Constant Field Values
TYPE_REFERER_TEMPLATE_ID
public static final int TYPE_REFERER_TEMPLATE_ID
- See Also:
- Constant Field Values
ORDER_BY_DATE
public static final int ORDER_BY_DATE
- See Also:
- Constant Field Values
TABLENAME
public static final java.lang.String TABLENAME
- See Also:
- Constant Field Values
COLNAME_PAGEVISIT_ID
public static final java.lang.String COLNAME_PAGEVISIT_ID
- See Also:
- Constant Field Values
COLNAME_USER_ID
public static final java.lang.String COLNAME_USER_ID
- See Also:
- Constant Field Values
COLNAME_TIMEOFVISIT
public static final java.lang.String COLNAME_TIMEOFVISIT
- See Also:
- Constant Field Values
COLNAME_REFERRER_URL
public static final java.lang.String COLNAME_REFERRER_URL
- See Also:
- Constant Field Values
COLNAME_PAGE_URL
public static final java.lang.String COLNAME_PAGE_URL
- See Also:
- Constant Field Values
COLNAME_BROWSER_STRING
public static final java.lang.String COLNAME_BROWSER_STRING
- See Also:
- Constant Field Values
COLNAME_IP_ADDRESS
public static final java.lang.String COLNAME_IP_ADDRESS
- See Also:
- Constant Field Values
COLNAME_PROCESSED
public static final java.lang.String COLNAME_PROCESSED
- See Also:
- Constant Field Values
COLNAME_FIRSTPAGE
public static final java.lang.String COLNAME_FIRSTPAGE
- See Also:
- Constant Field Values
COLNAME_LASTPAGE
public static final java.lang.String COLNAME_LASTPAGE
- See Also:
- Constant Field Values
COLNAME_VIEWING_TIME
public static final java.lang.String COLNAME_VIEWING_TIME
- See Also:
- Constant Field Values
COLNAME_SESSION_ID
public static final java.lang.String COLNAME_SESSION_ID
- See Also:
- Constant Field Values
COLNAME_PAGE_ID
public static final java.lang.String COLNAME_PAGE_ID
- See Also:
- Constant Field Values
COLNAME_ROOT_ARTICLE_ID
public static final java.lang.String COLNAME_ROOT_ARTICLE_ID
- See Also:
- Constant Field Values
COLNAME_ROOT_ARTICLE_TYPE_ID
public static final java.lang.String COLNAME_ROOT_ARTICLE_TYPE_ID
- See Also:
- Constant Field Values
COLNAME_TEMPLATE_ID
public static final java.lang.String COLNAME_TEMPLATE_ID
- See Also:
- Constant Field Values
COLNAME_REFER_ROOT_ARTICLE_ID
public static final java.lang.String COLNAME_REFER_ROOT_ARTICLE_ID
- See Also:
- Constant Field Values
COLNAME_REFER_ROOT_ARTICLE_TYPE_ID
public static final java.lang.String COLNAME_REFER_ROOT_ARTICLE_TYPE_ID
- See Also:
- Constant Field Values
COLNAME_REFER_TEMPLATE_ID
public static final java.lang.String COLNAME_REFER_TEMPLATE_ID
- See Also:
- Constant Field Values
COLNAME_WEB_USER_ID
public static final java.lang.String COLNAME_WEB_USER_ID
- See Also:
- Constant Field Values
COLUMN_LIST
public static final java.lang.String COLUMN_LIST
- See Also:
- Constant Field Values
PageVisitHome
public PageVisitHome(java.sql.Connection connection)
reports
public java.util.Collection reports(PageVisitFilter pFilter)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
configFilter
protected java.util.Collection configFilter(DataFilter filter,
java.lang.StringBuffer stmt)
- Builds up the SQL statement for extracting PageVisits based on the Filter
- Specified by:
configFilter in class FilteredDataAccess
- Parameters:
filter - stmt -
findPopularReferers
public java.util.Collection findPopularReferers(int id,
int limit,
int refererType)
throws java.sql.SQLException
- creates a collection of PopulatPageObjs and the amount of clicks to them from a referering Page
can be limited to just pulling back the most popular - say top 5
- Throws:
java.sql.SQLException
update
public void update(PageVisit pageVisit)
- updates the pagevisit just setting the fields that are not already set by the
- Parameters:
pageVisit -
getSelectByRow
protected java.lang.String getSelectByRow()
- Specified by:
getSelectByRow in class FilteredDataAccess
getSelectCount
protected java.lang.String getSelectCount()
- Specified by:
getSelectCount in class FilteredDataAccess
injectData
public void injectData(java.sql.ResultSet rs,
PageVisit pageVisit)
throws java.sql.SQLException
- Different to extract data as is will not create a new Object but rather inject into an existing one
- Parameters:
rs - pageVisit -
- Throws:
java.sql.SQLException
extractData
public java.lang.Object extractData(java.sql.ResultSet rs)
throws java.sql.SQLException
- Helper method to create PageVisit Objects from a results set
- Specified by:
extractData in class DataAccess
- Parameters:
rs -
- Returns:
-
- Throws:
java.sql.SQLException
main
public static void main(java.lang.String[] args)