public class ActivitySummary extends Object
| Modifier and Type | Field and Description | 
|---|---|
static int | 
MAX_BOOLEAN_POSITIONS
The Max size for summary boolean indicators (which are less common). 
 | 
static int | 
MAX_COUNT_POSITIONS
The Max size for summary counts. 
 | 
static int | 
MAX_NUMBER_POSITIONS
The Max size for summary number values (which are less common). 
 | 
static String[] | 
PERFORMEDACTIVITYRECORD_COUNT_COLUMNS
The column names in PerformedActivityRecord tables that correspond to the
 count array. 
 | 
static String[] | 
PERFORMEDACTIVITYRECORD_INDICATION_COLUMNS
The column names in PerformedActivityRecord tables that correspond to the
 indication array. 
 | 
static String[] | 
PERFORMEDACTIVITYRECORD_NUMBER_COLUMNS
The column names in PerformedActivityRecord tables that correspond to the
 number array. 
 | 
| Constructor and Description | 
|---|
ActivitySummary(ActivityProcessor proc)
Constructs a ActivitySummary. 
 | 
ActivitySummary(ActivityProcessor proc,
               String tableName,
               long summId)
Constructs a ActivitySummary that is (or will be) persistent 
 in a summary table. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addActivitySummaryDelta(ActivitySummary deltaSumm)
Add a summary delta to this ActivitySummary. 
 | 
static ActivitySummary | 
calculateActivitySummaryDelta(ActivitySummary leftSumm,
                             ActivitySummary rightSumm)
Calculate a summary delta from two ActivitySummary objects. 
 | 
void | 
clearIndication(int pos)
Clears (assign false value) the boolean indicator at the specified position. 
 | 
void | 
decrementCount(int pos)
Decrement the count at the specified position. 
 | 
static ActivitySummary | 
derivePreviousActivitySummary(ActivityRecord ar,
                             ActionAdapter lastAction)
Derive a previous ActivitySummary state for the specified ActivityRecord
 for Actions up to and including the specified Action. 
 | 
int | 
getActionCount()
Gets the total count of Actions performed. 
 | 
ActivityProcessor | 
getActivityProcessor()
Returns the ActivityProcessor context. 
 | 
int | 
getCount(int pos)
Gets the count at the specified position. 
 | 
Boolean | 
getIndication(int pos)
Gets the boolean indication value at the specified position. 
 | 
Long | 
getNumber(int pos)
Gets the number value at the specified position. 
 | 
String | 
getPerformedActivityRecordUpdateClause()
Get the update clause to use in updating the PerformedActivityRecord. 
 | 
String | 
getPerformedActivityRecordUpdateClause(boolean resetAfterAccess)
Get the update clause to use in updating the PerformedActivityRecord. 
 | 
LibrarySession | 
getSession()
Returns the session context, if the instance is constructed with a 
 non-null ActivityProcessor. 
 | 
long | 
getSummaryId()
Returns the Summary ID value in the summary table name that is holding 
 this record (if any). 
 | 
String | 
getSummaryTableName()
Returns the name of the summary table name that is holding 
 this summary (if any). 
 | 
void | 
incrementActionCount()
Increment the total Action count by 1. 
 | 
void | 
incrementActionCount(int incAmount)
Increment the total Action count by the specified amount. 
 | 
void | 
incrementCount(int pos)
Increment the count at the specified position by 1. 
 | 
void | 
incrementCount(int pos,
              int incAmount)
Increment the count at the specified position by the specified amount. 
 | 
protected void | 
insert(IfsConnection conn)
Inserts a summary record into the summary table specified at construction
  time, using the summary ID value specified at construction time. 
 | 
void | 
overwriteActivitySummary(ActivitySummary sourceSumm)
Overwrite the target with values from the specified ActivitySummary. 
 | 
void | 
setActionCount(int count)
Sets the total count of Actions performed.. 
 | 
void | 
setCount(int pos,
        int count)
Set the count at the specified position. 
 | 
void | 
setIndication(int pos)
Sets the boolean indicator at the specified position. 
 | 
void | 
setIndication(int pos,
             boolean val)
Sets the boolean indicator at the specified position 
 to the value specified. 
 | 
void | 
setIndication(int pos,
             Boolean val)
Sets the boolean indicator at the specified position 
 to the value specified. 
 | 
void | 
setNumber(int pos,
         long val)
Sets the number at the specified position to the value specified. 
 | 
void | 
setNumber(int pos,
         Long val)
Sets the number at the specified position to the value specified. 
 | 
void | 
setSummaryTableInfo(String tableName,
                   long summId)
Sets the ID and table information to be used for persisting the ActivitySummary. 
 | 
public static final int MAX_COUNT_POSITIONS
public static final int MAX_BOOLEAN_POSITIONS
public static final int MAX_NUMBER_POSITIONS
public static final String[] PERFORMEDACTIVITYRECORD_COUNT_COLUMNS
public static final String[] PERFORMEDACTIVITYRECORD_INDICATION_COLUMNS
public static final String[] PERFORMEDACTIVITYRECORD_NUMBER_COLUMNS
public ActivitySummary(ActivityProcessor proc)
proc - the ActivityProcessor that will produce 
                      and interpret this instancepublic ActivitySummary(ActivityProcessor proc, String tableName, long summId)
proc - the ActivityProcessor that will produce 
                      and interpret this instance; can be nulltableName - the table that will hold the summary recordsummId - the summary ID (obtained from a sequence)public void setSummaryTableInfo(String tableName, long summId)
tableName - the table that will hold the summary recordsummId - the summary ID (obtained from a sequence)protected void insert(IfsConnection conn) throws IfsException, SQLException
conn - the connection contextIfsException - if the operation failsSQLException - if the operation failspublic ActivityProcessor getActivityProcessor()
public LibrarySession getSession()
public String getSummaryTableName()
public long getSummaryId()
public int getActionCount()
public void setActionCount(int count)
count - the value to setpublic void incrementActionCount()
public void incrementActionCount(int incAmount)
incAmount - the amount to increment; a negative number implies
                      a decrementpublic int getCount(int pos)
pos - the position in the count arraypublic Boolean getIndication(int pos)
pos - the position in the boolean indication arraypublic Long getNumber(int pos)
pos - the position in the number arraypublic void setCount(int pos,
                     int count)
pos - the position in the count array to setcount - the value to setpublic void incrementCount(int pos)
pos - the position in the count array to incrementpublic void incrementCount(int pos,
                           int incAmount)
The amount can be a negative number.
pos - the position in the count array to incrementincAmount - the amount to increment; a negative number implies
                      a decrementpublic void decrementCount(int pos)
pos - the position in the count array to decrementpublic void setIndication(int pos,
                          Boolean val)
pos - the position in the boolean array to setval - the value to set; a null value indicates no settingpublic void setIndication(int pos,
                          boolean val)
pos - the position in the boolean array to setval - the value to setpublic void setIndication(int pos)
pos - the position in the boolean array to setpublic void clearIndication(int pos)
pos - the position in the boolean array to clearpublic void setNumber(int pos,
                      Long val)
pos - the position in the number array to setval - the value to set; a null value indicates no settingpublic void setNumber(int pos,
                      long val)
pos - the position in the number array to setval - the value to setpublic static ActivitySummary calculateActivitySummaryDelta(ActivitySummary leftSumm, ActivitySummary rightSumm) throws IfsException
 The delta is calculated as leftSumm - rightSumm.
leftSumm - the "left" ActivitySummary in the equationrightSumm - the "right" ActivitySummary in the equationIfsException - if the operation fails.public void addActivitySummaryDelta(ActivitySummary deltaSumm) throws IfsException
deltaSumm - ActivitySummary delta to add to the summaryIfsException - if the operation fails.public void overwriteActivitySummary(ActivitySummary sourceSumm) throws IfsException
sourceSumm - ActivitySummary that contains the values to overwriteIfsException - if the operation fails.public String getPerformedActivityRecordUpdateClause()
public String getPerformedActivityRecordUpdateClause(boolean resetAfterAccess)
resetAfterAccess - if true, resets the clause before returningpublic static ActivitySummary derivePreviousActivitySummary(ActivityRecord ar, ActionAdapter lastAction) throws IfsException
ar - the ActivityRecord whose previous state is to be derivedlastAction - the last action to be included in the 
                      derived ActivitySummaryIfsException - if the operation fails.Copyright © 2025. All rights reserved.