first commit

This commit is contained in:
2025-07-28 13:56:49 +05:30
commit e9eb805edb
3438 changed files with 520990 additions and 0 deletions

View File

@@ -0,0 +1,145 @@
package WEB-INF.classes.wenrgise.common.vo;
import java.io.Serializable;
import java.util.ArrayList;
import wenrgise.common.vo.BaseVO;
public class BaseDetailVO extends BaseVO implements Serializable {
private int recordsPerPage = 0;
private int maxPage = 0;
private long currentPage = 0L;
private long currentSlot = 0L;
private long totalDetailRecord = 0L;
private ArrayList oThisPageData = null;
private ArrayList oAllPageData = null;
int rowAdded = 0;
int rowDeleted = 0;
public BaseDetailVO() {
this.oThisPageData = new ArrayList();
this.oAllPageData = new ArrayList();
this.currentSlot = 0L;
}
public void reset() {
this.currentPage = 0L;
this.currentSlot = 0L;
this.oThisPageData = new ArrayList();
this.oAllPageData = new ArrayList();
}
public ArrayList getOAllPageData() {
return this.oAllPageData;
}
public void setOAllPageData(ArrayList newOAllPageData) {
this.oAllPageData = newOAllPageData;
}
public ArrayList getOThisPageData() {
return this.oThisPageData;
}
public void setOThisPageData(ArrayList newOThisPageData) {
this.oThisPageData = newOThisPageData;
}
public long getTotalDetailRecord() {
return this.totalDetailRecord;
}
public void setTotalDetailRecord(long newTotalDetailRecord) {
this.totalDetailRecord = newTotalDetailRecord;
}
public int getRowAdded() {
return this.rowAdded;
}
public void setRowAdded(int newRowAdded) {
this.rowAdded = newRowAdded;
}
public int getRowDeleted() {
return this.rowDeleted;
}
public void setRowDeleted(int newRowDeleted) {
this.rowDeleted = newRowDeleted;
}
public long getCurrentPage() {
return this.currentPage;
}
public void setCurrentPage(long newCurrentPage) {
this.currentPage = newCurrentPage;
}
public long getCurrentSlot() {
return this.currentSlot;
}
public void setCurrentSlot(long newCurrentSlot) {
this.currentSlot = newCurrentSlot;
}
public int getMaxPage() {
return this.maxPage;
}
public void setMaxPage(int newMaxPage) {
this.maxPage = newMaxPage;
}
public int getRecordsPerPage() {
return this.recordsPerPage;
}
public void setRecordsPerPage(int newRecordsPerPage) {
this.recordsPerPage = newRecordsPerPage;
}
public long getSlot(long lPageRequested) {
return (lPageRequested % this.maxPage != 0L) ? (lPageRequested / this.maxPage + 1L) : (lPageRequested / this.maxPage);
}
public int getRelativeStart(long lPageRequested) {
long lAbsoluteIndex = (lPageRequested - 1L) * this.recordsPerPage + 1L;
return (int)(lAbsoluteIndex % (this.recordsPerPage * this.maxPage)) - 1;
}
public int getRelativeEnd(long lPageRequested) {
long lAbsoluteIndexStart = (lPageRequested - 1L) * this.recordsPerPage;
long lAbsoluteEnd = (lAbsoluteIndexStart + this.recordsPerPage < this.totalDetailRecord) ? (lAbsoluteIndexStart + this.recordsPerPage) : this.totalDetailRecord;
int iMod = (int)(lAbsoluteEnd % (this.recordsPerPage * this.maxPage));
if (iMod != 0)
return iMod - 1;
return this.recordsPerPage * this.maxPage - 1;
}
public long getAbsoluteStart(long lPageRequested) {
return (lPageRequested - 1L) * this.recordsPerPage + 1L;
}
public long getAbsoluteEnd(long lPageRequested) {
long lStart = (lPageRequested - 1L) * this.recordsPerPage;
return (lStart + (this.recordsPerPage * this.maxPage) < this.totalDetailRecord) ? (lStart + (this.recordsPerPage * this.maxPage)) : this.totalDetailRecord;
}
public long getSlotStartPosition() {
return (this.currentSlot - 1L) * this.recordsPerPage * this.maxPage + 1L;
}
public long getSlotLastPosition() {
return (this.currentSlot * this.recordsPerPage * this.maxPage < this.totalDetailRecord) ? (this.currentSlot * this.recordsPerPage * this.maxPage) : this.totalDetailRecord;
}
}

View File

@@ -0,0 +1,86 @@
package WEB-INF.classes.wenrgise.common.vo;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import wenrgise.common.bean.BaseHeaderBean;
import wenrgise.common.exception.EnrgiseApplicationException;
import wenrgise.common.vo.BaseVO;
public class BaseHeaderVO extends BaseVO implements Serializable {
private ArrayList oHeaderVOTable = new ArrayList();
private long positionRequested = 0L;
private long currentSlot = 0L;
private long totalCount = 0L;
private long maxHeaderSize = 0L;
private Timestamp oWhenPicked = null;
public ArrayList getOHeaderVOTable() {
return this.oHeaderVOTable;
}
public long getHeaderStartPosition() throws EnrgiseApplicationException {
int iSlot = getSlot();
return (iSlot - 1) * this.maxHeaderSize + 1L;
}
public long getHeaderLastPosition() throws EnrgiseApplicationException {
int iSlot = getSlot();
return (iSlot * this.maxHeaderSize < this.totalCount) ? (iSlot * this.maxHeaderSize) : this.totalCount;
}
public int getSlot() throws EnrgiseApplicationException {
if (this.positionRequested < 0L || this.positionRequested > this.totalCount)
throw new EnrgiseApplicationException("wenrgise.common.navigation", "E");
return ((int)(this.positionRequested % this.maxHeaderSize) != 0) ? (int)((int)this.positionRequested / this.maxHeaderSize + 1L) : (int)(this.positionRequested / this.maxHeaderSize);
}
public void setOHeaderVOTable(ArrayList newOHeaderVOTable) {
this.oHeaderVOTable = newOHeaderVOTable;
}
public BaseHeaderBean getHeaderRecord(int iPosition) throws EnrgiseApplicationException {
if (this.oHeaderVOTable == null)
throw new EnrgiseApplicationException("wenrgise.common.norecordfound", "M");
if (this.oHeaderVOTable.size() == 0 || this.oHeaderVOTable.size() < iPosition)
throw new EnrgiseApplicationException("wenrgise.common.norecordfound", "M");
return this.oHeaderVOTable.get(iPosition - 1);
}
public long getPositionRequested() {
return this.positionRequested;
}
public void setPositionRequested(long newPositionRequested) {
this.positionRequested = newPositionRequested;
}
public long getCurrentSlot() {
return this.currentSlot;
}
public void setCurrentSlot(long newCurrentSlot) {
this.currentSlot = newCurrentSlot;
}
public long getTotalCount() {
return this.totalCount;
}
public void setTotalCount(long newTotalCount) {
this.totalCount = newTotalCount;
}
public long getMaxHeaderSize() {
return this.maxHeaderSize;
}
public void setMaxHeaderSize(long newMaxHeaderSize) {
this.maxHeaderSize = newMaxHeaderSize;
}
}

View File

@@ -0,0 +1,45 @@
package WEB-INF.classes.wenrgise.common.vo;
import java.io.Serializable;
public class BaseQueryVO implements Serializable {
private long positionRequested = 0L;
private String headerPrimaryKey = null;
private int maxHeaderSize = 0;
private String workListId;
public long getPositionRequested() {
return this.positionRequested;
}
public void setPositionRequested(long newPositionRequested) {
this.positionRequested = newPositionRequested;
}
public String getHeaderPrimaryKey() {
return this.headerPrimaryKey;
}
public void setHeaderPrimaryKey(String newHeaderPrimaryKey) {
this.headerPrimaryKey = newHeaderPrimaryKey;
}
public int getMaxHeaderSize() {
return this.maxHeaderSize;
}
public void setMaxHeaderSize(int newMaxHeaderSize) {
this.maxHeaderSize = newMaxHeaderSize;
}
public String getWorkListId() {
return this.workListId;
}
public void setWorkListId(String newWorkListId) {
this.workListId = newWorkListId;
}
}

View File

@@ -0,0 +1,36 @@
package WEB-INF.classes.wenrgise.common.vo;
import java.io.Serializable;
import java.sql.Timestamp;
public class BaseVO implements Serializable {
private Timestamp oWhenPicked = null;
private long firstPosition = 0L;
private long lastPosition = 0L;
public Timestamp getOWhenPicked() {
return this.oWhenPicked;
}
public void setOWhenPicked(Timestamp newOWhenPicked) {
this.oWhenPicked = newOWhenPicked;
}
public long getFirstPosition() {
return this.firstPosition;
}
public void setFirstPosition(long newFirstPosition) {
this.firstPosition = newFirstPosition;
}
public long getLastPosition() {
return this.lastPosition;
}
public void setLastPosition(long newLastPosition) {
this.lastPosition = newLastPosition;
}
}