|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.stock.modules.tickets.service.StatisticService
public class StatisticService
The service Statistic.
| Field Summary | |
|---|---|
static java.lang.String |
CONSTANT_GROUP_BY_DAY
The CONSTAN t_ grou p_ b y_ day. |
static java.lang.String |
CONSTANT_GROUP_BY_MONTH
The CONSTAN t_ grou p_ b y_ month. |
static java.lang.String |
CONSTANT_GROUP_BY_WEEK
The CONSTAN t_ grou p_ b y_ week. |
static java.lang.String |
EMPTY_STRING
The EMPT y_ string. |
static java.lang.String |
EXPORT_HEADER_DATE
The EXPOR t_ heade r_ date. |
static java.lang.String |
EXPORT_HEADER_GROUPE_DAY
The EXPOR t_ heade r_ group e_ day. |
static java.lang.String |
EXPORT_HEADER_GROUPE_MONTH
The EXPOR t_ heade r_ group e_ month. |
static java.lang.String |
EXPORT_HEADER_GROUPE_WEEK
The EXPOR t_ heade r_ group e_ week. |
static java.lang.String |
EXPORT_HEADER_NB_PRODUCTS
The EXPOR t_ heade r_ n b_ products. |
| Constructor Summary | |
|---|---|
StatisticService()
|
|
| Method Summary | |
|---|---|
static java.sql.Timestamp |
addStatisticInterval(java.sql.Timestamp timestamp,
java.lang.String strTimesUnit,
int nDecal)
return a timestamp Object which correspond to the timestamp in parameter add with a number of times unit (day,week,month)specify in strTimesUnit . |
static java.util.List<java.lang.String[]> |
buildListToCSVWriter(java.util.Collection<ResultStatistic> listData,
java.lang.String strTimesUnit,
java.util.Locale locale)
Converts the informations to export into a list of String[]. |
static org.jfree.chart.JFreeChart |
createXYGraph(java.util.List<ResultStatistic> listStatistic,
java.lang.String strLabelX,
java.lang.String strLableY,
java.lang.String strTimesUnit)
create a JFreeChart Graph function of the statistic form submit. |
void |
doManageProductSaving(ShowDTO productDTO)
Modifies a productStatistic |
void |
doManagePurchaseSaving(ReservationDTO purchaseDTO)
Modifies a purchaseStatistic |
void |
doRemoveProductStatisticByIdProduct(java.lang.Integer nIdProduct)
remove all product statistic associated to the product identifier |
void |
doRemovePurchaseStatisticByIdPurchase(java.lang.Integer nIdPurchase)
remove all purchase statistic associated to the purchase identifier |
java.lang.Integer |
getCountProductALAffiche()
get the product showing count |
java.lang.Integer |
getCountProductAVenir()
get the product forthcoming count |
java.lang.Integer |
getCountProductsByDates(java.lang.String strDateDebut,
java.lang.String strDateFin)
get the products count by dates parameters |
java.lang.Integer |
getCountPurchaseOfDay()
get the purchase day count |
java.lang.Integer |
getCountPurchaseOfMonth()
get the purchase month count |
java.lang.Integer |
getCountPurchasesByDates(java.lang.String strDateDebut,
java.lang.String strDateFin)
get the purchase count by dates parameters. |
java.util.List<ResultStatistic> |
getProductStatistic(java.lang.String strTimesUnit,
java.lang.String strDateDebut,
java.lang.String strDateFin)
get a list of ResultStatistic containing all associations of date and number of product by parameters |
java.util.List<ResultStatistic> |
getPurchaseStatistic(java.lang.String strTimesUnit,
java.lang.String strDateDebut,
java.lang.String strDateFin)
get a list of ResultStatistic containing all associations of date and number of purchase by parameters |
static boolean |
sameDate(java.sql.Timestamp timestamp1,
java.sql.Timestamp timestamp2,
java.lang.String strTimesUnit)
Compare two timestamp and return true if they have the same times unit(Day,week,month). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CONSTANT_GROUP_BY_DAY
public static final java.lang.String CONSTANT_GROUP_BY_WEEK
public static final java.lang.String CONSTANT_GROUP_BY_MONTH
public static final java.lang.String EXPORT_HEADER_DATE
public static final java.lang.String EXPORT_HEADER_NB_PRODUCTS
public static final java.lang.String EXPORT_HEADER_GROUPE_DAY
public static final java.lang.String EXPORT_HEADER_GROUPE_WEEK
public static final java.lang.String EXPORT_HEADER_GROUPE_MONTH
public static final java.lang.String EMPTY_STRING
| Constructor Detail |
|---|
public StatisticService()
| Method Detail |
|---|
public static java.sql.Timestamp addStatisticInterval(java.sql.Timestamp timestamp,
java.lang.String strTimesUnit,
int nDecal)
timestamp - datestrTimesUnit - (day,week,month)nDecal - the number of timesUnit
public static boolean sameDate(java.sql.Timestamp timestamp1,
java.sql.Timestamp timestamp2,
java.lang.String strTimesUnit)
timestamp1 - timestamp1timestamp2 - timestamp2strTimesUnit - (day,week,month)
public void doManageProductSaving(ShowDTO productDTO)
doManageProductSaving in interface IStatisticServiceproductDTO - The product of the productStatistic to modify in database
public java.util.List<ResultStatistic> getProductStatistic(java.lang.String strTimesUnit,
java.lang.String strDateDebut,
java.lang.String strDateFin)
getProductStatistic in interface IStatisticServicestrTimesUnit - the time unitstrDateDebut - the date beginstrDateFin - teh date end
public static org.jfree.chart.JFreeChart createXYGraph(java.util.List<ResultStatistic> listStatistic,
java.lang.String strLabelX,
java.lang.String strLableY,
java.lang.String strTimesUnit)
listStatistic - the list of statistic of form submitstrLabelX - the label of axis xstrLableY - the label of axis xstrTimesUnit - the times unit of axis x(Day,Week,Month)
public java.lang.Integer getCountProductsByDates(java.lang.String strDateDebut,
java.lang.String strDateFin)
getCountProductsByDates in interface IStatisticServicestrDateDebut - the date beginstrDateFin - teh date end
public static java.util.List<java.lang.String[]> buildListToCSVWriter(java.util.Collection<ResultStatistic> listData,
java.lang.String strTimesUnit,
java.util.Locale locale)
listData - The list data to convertstrTimesUnit - the str times unitlocale - the locale
public void doManagePurchaseSaving(ReservationDTO purchaseDTO)
doManagePurchaseSaving in interface IStatisticServicepurchaseDTO - The purchase of the purchaseStatistic to modify in database
public java.util.List<ResultStatistic> getPurchaseStatistic(java.lang.String strTimesUnit,
java.lang.String strDateDebut,
java.lang.String strDateFin)
getPurchaseStatistic in interface IStatisticServicestrTimesUnit - the time unitstrDateDebut - the date beginstrDateFin - teh date end
public java.lang.Integer getCountPurchasesByDates(java.lang.String strDateDebut,
java.lang.String strDateFin)
getCountPurchasesByDates in interface IStatisticServicestrDateDebut - the date beginstrDateFin - the date end
public java.lang.Integer getCountProductALAffiche()
getCountProductALAffiche in interface IStatisticServicepublic java.lang.Integer getCountProductAVenir()
getCountProductAVenir in interface IStatisticServicepublic java.lang.Integer getCountPurchaseOfDay()
getCountPurchaseOfDay in interface IStatisticServicepublic java.lang.Integer getCountPurchaseOfMonth()
getCountPurchaseOfMonth in interface IStatisticServicepublic void doRemoveProductStatisticByIdProduct(java.lang.Integer nIdProduct)
doRemoveProductStatisticByIdProduct in interface IStatisticServicenIdProduct - the identifier of the productpublic void doRemovePurchaseStatisticByIdPurchase(java.lang.Integer nIdPurchase)
doRemovePurchaseStatisticByIdPurchase in interface IStatisticServicenIdPurchase - the identifier of the product
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||