本文整理汇总了Java中org.kuali.rice.kew.stats.Stats类的典型用法代码示例。如果您正苦于以下问题:Java Stats类的具体用法?Java Stats怎么用?Java Stats使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Stats类属于org.kuali.rice.kew.stats包,在下文中一共展示了Stats类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: NumInitiatedDocsByDocTypeReport
import org.kuali.rice.kew.stats.Stats; //导入依赖的package包/类
@Override
public void NumInitiatedDocsByDocTypeReport(Stats stats) throws SQLException {
Query query = getEntityManager().createQuery(STATS_NUM_INITIATED_DOCS_BY_DOC_TYPE_REPORT);
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DAY_OF_YEAR, -29);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
query.setParameter("createDate", new Timestamp(calendar.getTime().getTime()));
@SuppressWarnings("unchecked")
List<Object[]> resultList = query.getResultList();
List<KeyValue> numDocs = new ArrayList<KeyValue>(resultList.size());
for (Object[] result : resultList) {
numDocs.add(new ConcreteKeyValue(result[1].toString(),result[0].toString()));
}
stats.setNumInitiatedDocsByDocType(numDocs);
}
示例2: NumInitiatedDocsByDocTypeReport
import org.kuali.rice.kew.stats.Stats; //导入依赖的package包/类
@Override
public void NumInitiatedDocsByDocTypeReport(Stats stats) throws SQLException, LookupException {
Query query = entityManager.createQuery("select count(*), dt.name from DocumentRouteHeaderValue drhv, DocumentType dt where drhv.createDate > :createDate and drhv.documentTypeId = dt.documentTypeId group by dt.name");
// Query query = entityManager.createNamedQuery("Stats.NumInitiatedDocsByDocTypeReport");
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DAY_OF_YEAR, -29);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
query.setParameter("createDate", new Timestamp(calendar.getTime().getTime()));
@SuppressWarnings("unchecked")
List<Object[]> resultList = query.getResultList();
List<KeyValue> numDocs = new ArrayList<KeyValue>(resultList.size());
for (Object[] result : resultList) {
numDocs.add(new ConcreteKeyValue(result[1].toString(),result[0].toString()));
}
stats.setNumInitiatedDocsByDocType(numDocs);
}
示例3: NumInitiatedDocsByDocTypeReport
import org.kuali.rice.kew.stats.Stats; //导入依赖的package包/类
@Override
public void NumInitiatedDocsByDocTypeReport(Stats stats) throws SQLException, LookupException {
LOG.debug("NumInitiatedDocsByDocType()");
PersistenceBroker broker = this.getPersistenceBroker(false);
Connection conn = broker.serviceConnectionManager().getConnection();
PreparedStatement ps = conn.prepareStatement(StatsDAOOjbImpl.SQL_NUM_DOCS_INITIATED);
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DAY_OF_YEAR, -29);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
ps.setTimestamp(1, new Timestamp(calendar.getTime().getTime()));
ResultSet rs = ps.executeQuery();
List<KeyValue> numDocs = new ArrayList<KeyValue>();
while (rs.next()) {
numDocs.add(new ConcreteKeyValue(rs.getString(2), new Integer(rs.getInt(1)).toString()));
}
stats.setNumInitiatedDocsByDocType(numDocs);
closeDatabaseObjects(rs, ps, conn/*, broker*/);
}
示例4: DocumentsRoutedReport
import org.kuali.rice.kew.stats.Stats; //导入依赖的package包/类
@Override
public void DocumentsRoutedReport(Stats stats, Date begDate, Date endDate) throws SQLException {
Query query = getEntityManager().createQuery(STATS_DOCUMENTS_ROUTED_REPORT);
query.setParameter("beginDate", new Timestamp(begDate.getTime()));
query.setParameter("endDate", new Timestamp(endDate.getTime()));
@SuppressWarnings("unchecked")
List<Object[]> resultList = query.getResultList();
for (Object[] result : resultList) {
String actionType = result[1].toString();
String number = result[0].toString();
if (actionType.equals(KewApiConstants.ROUTE_HEADER_CANCEL_CD)) {
stats.setCanceledNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_DISAPPROVED_CD)) {
stats.setDisapprovedNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_ENROUTE_CD)) {
stats.setEnrouteNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_EXCEPTION_CD)) {
stats.setExceptionNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_FINAL_CD)) {
stats.setFinalNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_INITIATED_CD)) {
stats.setInitiatedNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_PROCESSED_CD)) {
stats.setProcessedNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_SAVED_CD)) {
stats.setSavedNumber(number);
}
}
}
示例5: DocumentsRoutedReport
import org.kuali.rice.kew.stats.Stats; //导入依赖的package包/类
@Override
public void DocumentsRoutedReport(Stats stats, Date begDate, Date endDate) throws SQLException, LookupException {
Query query = entityManager.createQuery("select count(*) as count, drhv.docRouteStatus from DocumentRouteHeaderValue drhv where drhv.createDate between :beginDate and :endDate group by docRouteStatus");
// Query query = entityManager.createNamedQuery("Stats.DocumentsRoutedReport");
query.setParameter("beginDate", new Timestamp(begDate.getTime()));
query.setParameter("endDate", new Timestamp(endDate.getTime()));
@SuppressWarnings("unchecked")
List<Object[]> resultList = query.getResultList();
for (Object[] result : resultList) {
String actionType = result[1].toString();
String number = result[0].toString();
if (actionType.equals(KewApiConstants.ROUTE_HEADER_CANCEL_CD)) {
stats.setCanceledNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_DISAPPROVED_CD)) {
stats.setDisapprovedNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_ENROUTE_CD)) {
stats.setEnrouteNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_EXCEPTION_CD)) {
stats.setExceptionNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_FINAL_CD)) {
stats.setFinalNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_INITIATED_CD)) {
stats.setInitiatedNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_PROCESSED_CD)) {
stats.setProcessedNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_SAVED_CD)) {
stats.setSavedNumber(number);
}
}
}
示例6: NumActiveItemsReport
import org.kuali.rice.kew.stats.Stats; //导入依赖的package包/类
@Override
public void NumActiveItemsReport(Stats stats) throws SQLException, LookupException {
LOG.debug("NumActiveItemsReport()");
PersistenceBroker broker = this.getPersistenceBroker(false);
Connection conn = broker.serviceConnectionManager().getConnection();
PreparedStatement ps = conn.prepareStatement(StatsDAOOjbImpl.SQL_NUM_ACTIVE_ITEMS);
ResultSet rs = ps.executeQuery();
while (rs.next()) {
stats.setNumActionItems(new Integer(rs.getInt(1)).toString());
}
closeDatabaseObjects(rs, ps, conn/*, broker*/);
}
示例7: NumberOfDocTypesReport
import org.kuali.rice.kew.stats.Stats; //导入依赖的package包/类
@Override
public void NumberOfDocTypesReport(Stats stats) throws SQLException, LookupException {
LOG.debug("NumberOfDocTypesReport()");
PersistenceBroker broker = this.getPersistenceBroker(false);
Connection conn = broker.serviceConnectionManager().getConnection();
PreparedStatement ps = conn.prepareStatement(StatsDAOOjbImpl.SQL_NUM_DOC_TYPES_REPORT);
ResultSet rs = ps.executeQuery();
while (rs.next()) {
stats.setNumDocTypes(new Integer(rs.getInt(1)).toString());
}
closeDatabaseObjects(rs, ps, conn/*, broker*/);
}
示例8: DocumentsRoutedReport
import org.kuali.rice.kew.stats.Stats; //导入依赖的package包/类
@Override
public void DocumentsRoutedReport(Stats stats, Date begDate, Date endDate) throws SQLException, LookupException {
LOG.debug("DocumentsRoutedReport()");
PersistenceBroker broker = this.getPersistenceBroker(false);
Connection conn = broker.serviceConnectionManager().getConnection();
PreparedStatement ps = conn.prepareStatement(StatsDAOOjbImpl.SQL_DOCUMENTS_ROUTED);
ps.setTimestamp(1, new Timestamp(begDate.getTime()));
ps.setTimestamp(2, new Timestamp(endDate.getTime()));
ResultSet rs = ps.executeQuery();
while (rs.next()) {
String actionType = rs.getString(2);
String number = new Integer(rs.getInt(1)).toString();
if (actionType.equals(KewApiConstants.ROUTE_HEADER_CANCEL_CD)) {
stats.setCanceledNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_DISAPPROVED_CD)) {
stats.setDisapprovedNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_ENROUTE_CD)) {
stats.setEnrouteNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_EXCEPTION_CD)) {
stats.setExceptionNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_FINAL_CD)) {
stats.setFinalNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_INITIATED_CD)) {
stats.setInitiatedNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_PROCESSED_CD)) {
stats.setProcessedNumber(number);
} else if (actionType.equals(KewApiConstants.ROUTE_HEADER_SAVED_CD)) {
stats.setSavedNumber(number);
}
}
closeDatabaseObjects(rs, ps, conn/*, broker*/);
}
示例9: NumUsersReport
import org.kuali.rice.kew.stats.Stats; //导入依赖的package包/类
@Override
public void NumUsersReport(Stats stats) throws SQLException, LookupException {
LOG.debug("NumUsersReport()");
PersistenceBroker broker = this.getPersistenceBroker(false);
Connection conn = broker.serviceConnectionManager().getConnection();
PreparedStatement ps = conn.prepareStatement(StatsDAOOjbImpl.SQL_NUM_USERS);
ResultSet rs = ps.executeQuery();
while (rs.next()) {
stats.setNumUsers(new Integer(rs.getInt("prsn_count")).toString());
}
closeDatabaseObjects(rs, ps, conn/*, broker*/);
}
示例10: StatsForm
import org.kuali.rice.kew.stats.Stats; //导入依赖的package包/类
public StatsForm() {
stats = new Stats();
}
示例11: getStats
import org.kuali.rice.kew.stats.Stats; //导入依赖的package包/类
public Stats getStats() {
return stats;
}
示例12: setStats
import org.kuali.rice.kew.stats.Stats; //导入依赖的package包/类
public void setStats(Stats stats) {
this.stats = stats;
}
示例13: NumActiveItemsReport
import org.kuali.rice.kew.stats.Stats; //导入依赖的package包/类
@Override
public void NumActiveItemsReport(Stats stats) throws SQLException {
stats.setNumActionItems(getEntityManager().createQuery(STATS_NUM_ACTIVE_ITEMS_REPORT)
.getSingleResult().toString());
}
示例14: NumUsersReport
import org.kuali.rice.kew.stats.Stats; //导入依赖的package包/类
@Override
public void NumUsersReport(Stats stats) throws SQLException {
stats.setNumUsers(getEntityManager().createQuery(STATS_NUM_USERS_REPORT).getSingleResult().toString());
}
示例15: NumberOfDocTypesReport
import org.kuali.rice.kew.stats.Stats; //导入依赖的package包/类
@Override
public void NumberOfDocTypesReport(Stats stats) throws SQLException {
stats.setNumDocTypes(getEntityManager().createQuery(
STATS_NUM_DOC_TYPES_REPORT).getSingleResult().toString());
}