Package com.storedobject.iot
Class YearlyStatistics
- All Implemented Interfaces:
Displayable
,StringFiller
,DBTransaction.NoHistory
,HasId
Represents statistics that are aggregated on a yearly basis.
Inherits functionality from the base Statistics class and adds methods
specific to yearly data representation.
- Author:
- Syam
-
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes a new instance of the YearlyStatistics class. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Sets or processes the provided columns for a specific operation or configuration.int
Retrieves the period value for this instance, which corresponds to the year.Generates a detailed string representation of the period for this instance.Retrieves the type of period associated with this instance.static void
Configures the provided Indices object by adding an index definition with "Unit,Name,Year" as the index key and a flag indicating whether the index is unique.next()
Retrieves the next instance of YearlyStatistics corresponding to the subsequent year, if the current year is less than the present year.previous()
Retrieves the YearlyStatistics object for the previous year relative to the current instance's year value.Methods inherited from class com.storedobject.iot.Statistics
add, add, getCount, getMax, getMean, getMin, getName, getPeriodName, getSD, getUnit, getUnitId, getYear, setCount, setMax, setMean, setMin, setName, setSD, setUnit, setUnit, setUnit, setYear, toDisplay, validateData
Methods inherited from class com.storedobject.core.StoredObject
addLink, addLink, addLink, addLink, addLink, addLink, addLink, addLink, checkCurrency, checkCurrency, checkForDuplicate, checkForDuplicate, checkTimeZone, checkTransaction, clearObjectLinks, contemporary, copy, copy, count, count, count, count, count, count, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, create, created, delete, delete, delete, deleted, directUpdate, equals, exists, exists, exists, exists, exists, existsFileData, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsMaster, existsMaster, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, family, family, family, fill, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getAttachment, getAttachmentId, getChildren, getDeleted, getDeleted, getExistsCondition, getExistsCondition, getFileData, getFileData, getHistorical, getId, getKeyIndex, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getNotExistsCondition, getNotExistsCondition, getParent, getParent, getParent, getParentId, getParentId, getParentId, getRelated, getRelated, getTransaction, getTransactionId, getTransactionIP, getUnique, getUniqueCondition, hashCode, inserted, isModified, isVirtual, list, list, list, list, list, list, list, list, list, list, list, list, list, listFileData, listFileData, listHistory, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listTree, listTree, listTree, listTree, listViaQuery, listViaQuery, load, load, load, load, loaded, loading, makeNew, makeVirtual, migrate, moduleName, nextVersion, objectLink, objectLink, objectLink, objectLinks, objectLinks, old, person, previousVersion, previousVersion, query, query, query, query, query, query, query, query, query, query, query, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, reload, reload, reloaded, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeReverseLinks, removeReverseLinks, save, save, save, save, save, save, save, save, save, save, save, save, save, save, saved, saving, setMaster, setRawValue, setTransaction, stringify, tableName, timestamp, toCode, toString, transacting, undelete, undelete, undeleted, updated, user, userId, validate, validateChildAttach, validateChildDetach, validateChildUpdate, validateDelete, validateInsert, validateParentAttach, validateParentDetach, validateParentUpdate, validateUndelete, validateUpdate, valueEquals
-
Constructor Details
-
YearlyStatistics
public YearlyStatistics()Initializes a new instance of the YearlyStatistics class. This constructor sets up the necessary properties for handling statistics aggregated on a yearly basis.
-
-
Method Details
-
columns
Sets or processes the provided columns for a specific operation or configuration.- Parameters:
columns
- the columns object that contains the data structure or metadata to be used
-
indices
Configures the provided Indices object by adding an index definition with "Unit,Name,Year" as the index key and a flag indicating whether the index is unique.- Parameters:
indices
- the Indices object to which the index definition is added
-
getPeriod
public int getPeriod()Retrieves the period value for this instance, which corresponds to the year.- Specified by:
getPeriod
in classStatistics<PeriodType>
- Returns:
- the year value as an integer.
-
getPeriodDetail
Generates a detailed string representation of the period for this instance. Specifically, it retrieves the year and formats it like "Year 1998".- Specified by:
getPeriodDetail
in classStatistics<PeriodType>
- Returns:
- a string representation of the period detail, formatted like "Year 1998".
-
previous
Retrieves the YearlyStatistics object for the previous year relative to the current instance's year value. This method constructs a query condition to fetch the previous year's statistics while including additional filtering conditions based on the current instance's context.- Specified by:
previous
in classStatistics<PeriodType>
- Returns:
- a YearlyStatistics object representing the statistics for the previous year, or null if no data exists for the calculated year with the specified conditions.
-
next
Retrieves the next instance of YearlyStatistics corresponding to the subsequent year, if the current year is less than the present year. Constructs a query condition to fetch the relevant data.- Specified by:
next
in classStatistics<PeriodType>
- Returns:
- the next YearlyStatistics instance if available; otherwise, returns null if the current year is the same as or greater than the present year.
-
getPeriodType
Retrieves the type of period associated with this instance.- Specified by:
getPeriodType
in classStatistics<PeriodType>
- Returns:
- the period type, which is
PeriodType.YEARLY
.
-