📄 workparams.java
字号:
package net.java.workeffort.params;import java.util.ArrayList;import java.util.Date;import java.util.List;import net.java.workeffort.service.domain.Work;import net.java.workeffort.service.domain.WorkAssociation;import net.java.workeffort.service.domain.WorkDeliverableProduced;import net.java.workeffort.service.domain.WorkFixedAssetAssignment;import net.java.workeffort.service.domain.WorkInventoryAssignment;import net.java.workeffort.service.domain.WorkPartyAssignment;import net.java.workeffort.service.domain.WorkProductProduced;import net.java.workeffort.service.domain.WorkQuery;import net.java.workeffort.service.domain.WorkRequirement;import net.java.workeffort.webapp.support.WebappUtils;/** * @author Antony Joseph */public class WorkParams { public WorkQuery testGetPageResultWork() { WorkQuery query = new WorkQuery(); query.setWorkId(new Long(4001)); query.setPageSize(new Integer(10)); query.setPageIndex(new Integer(0)); return query; } public Long testGetWork() { return new Long(4001); } public Work testInsertWork() { Work input = new Work(); input.setWorkTypeCd("WORK"); input.setName("test"); input.setWorkStatusCd("WORK"); return input; } public Work testUpdateWork() { Work input = new Work(); input.setWorkId(new Long(4002)); input.setVersion(new Integer(1)); input.setName("test"); input.setWorkTypeCd("WORK"); input.setWorkStatusCd("WORK"); return input; } public Work testDeleteWork() { Work input = new Work(); input.setWorkId(new Long(4003)); input.setVersion(new Integer(1)); return input; } public Work testUpdateWorkOptLck() { Work input = new Work(); input.setWorkId(new Long(40021)); input.setVersion(new Integer(6)); input.setWorkTypeCd("WORK"); input.setWorkStatusCd("WORK"); return input; } public Long testGetWorkWithAssociation() { return (new Long(4101)); } public Work testSaveWorkWithAssociationInsert() { Work input = new Work(); input.setWorkId(new Long(4201)); WorkAssociation detail = new WorkAssociation(); detail.setWorkId(new Long(4202)); detail.setWorkAssociationTypeCd("WORK"); detail.setProcessType("insert"); List associations = new ArrayList(); associations.add(detail); input.setWorkAssociation(associations); return input; } public Work testSaveWorkWithAssociationDelete() { Work input = new Work(); input.setWorkId(new Long(4301)); WorkAssociation detail = new WorkAssociation(); detail.setWorkId(new Long(4302)); detail.setWorkAssociationTypeCd("WORK"); detail.setVersion(new Integer(1)); detail.setProcessType("delete"); List associations = new ArrayList(); associations.add(detail); input.setWorkAssociation(associations); return input; } public Work testSaveWorkWithAssociationDupRec() { Work input = new Work(); input.setWorkId(new Long(4401)); WorkAssociation detail = new WorkAssociation(); detail.setWorkId(new Long(4402)); detail.setWorkAssociationTypeCd("WORK"); detail.setProcessType("insert"); List associations = new ArrayList(); associations.add(detail); input.setWorkAssociation(associations); return input; } public Long testGetWorkWithDeliverableProduced() { return (new Long(4501)); } public Work testSaveWorkWithDeliverableProducedInsert() { Work input = new Work(); input.setWorkId(new Long(4601)); WorkDeliverableProduced detail = new WorkDeliverableProduced(); detail.setDeliverableId(new Long(4601)); detail.setProcessType("insert"); List deliverableProduced = new ArrayList(); deliverableProduced.add(detail); input.setWorkDeliverableProduced(deliverableProduced); return input; } public Work testSaveWorkWithDeliverableProducedDelete() { Work input = new Work(); input.setWorkId(new Long(4701)); WorkDeliverableProduced detail = new WorkDeliverableProduced(); detail.setDeliverableId(new Long("4701")); detail.setVersion(new Integer(1)); detail.setProcessType("delete"); List deliverableProduced = new ArrayList(); deliverableProduced.add(detail); input.setWorkDeliverableProduced(deliverableProduced); return input; } // ======================= FixedAssetAssignment========================== public Long testGetWorkWithFixedAssetAssignment() { return (new Long(4801)); } public Work testSaveWorkWithFixedAssetAssignmentInsert() { Work input = new Work(); input.setWorkId(new Long(4901)); WorkFixedAssetAssignment detail = new WorkFixedAssetAssignment(); detail.setFixedAssetCd("WRKFXD4901"); detail.setFromDt(new Date()); detail.setProcessType("insert"); List fixedAssetAssignments = new ArrayList(); fixedAssetAssignments.add(detail); input.setWorkFixedAssetAssignment(fixedAssetAssignments); return input; } public Work testSaveWorkWithFixedAssetAssignmentDelete() { Work input = new Work(); input.setWorkId(new Long(41001)); WorkFixedAssetAssignment detail = new WorkFixedAssetAssignment(); detail.setFixedAssetCd("WRKFXD41001"); detail.setFromDt(WebappUtils .convertStringToDate("20040101", "yyyyMMdd")); detail.setVersion(new Integer(1)); detail.setProcessType("delete"); List fixedAssetAssignments = new ArrayList(); fixedAssetAssignments.add(detail); input.setWorkFixedAssetAssignment(fixedAssetAssignments); return input; } //======================= inventory Assignment ========================= public Long testGetWorkWithInventoryAssignment() { return (new Long(42001)); } public Work testSaveWorkWithInventoryAssignmentInsert() { Work input = new Work(); input.setWorkId(new Long(43001)); WorkInventoryAssignment detail = new WorkInventoryAssignment(); detail.setPartCd("WRKPRT43001"); detail.setProcessType("insert"); List inventoryAssignments = new ArrayList(); inventoryAssignments.add(detail); input.setWorkInventoryAssignment(inventoryAssignments); return input; } public Work testSaveWorkWithInventoryAssignmentDelete() { Work input = new Work(); input.setWorkId(new Long(44001)); WorkInventoryAssignment detail = new WorkInventoryAssignment(); detail.setPartCd("WRKPRT44001"); detail.setVersion(new Integer(1)); detail.setProcessType("delete"); List inventoryAssignments = new ArrayList(); inventoryAssignments.add(detail); input.setWorkInventoryAssignment(inventoryAssignments); return input; } // ======================= partyAssignment ========================= public Long testGetWorkWithPartyAssignment() { return (new Long(45001)); } public Work testSaveWorkWithPartyAssignmentInsert() { Work input = new Work(); input.setWorkId(new Long(46001)); WorkPartyAssignment detail = new WorkPartyAssignment(); detail.setPartyCd("WRKPAR46001"); detail.setWorkRoleCd("WORK"); detail.setProcessType("insert"); List partyAssignments = new ArrayList(); partyAssignments.add(detail); input.setWorkPartyAssignment(partyAssignments); return input; } public Work testSaveWorkWithPartyAssignmentDelete() { Work input = new Work(); input.setWorkId(new Long(47001)); WorkPartyAssignment detail = new WorkPartyAssignment(); detail.setPartyCd("WRKPAR47001"); detail.setWorkRoleCd("WORK"); detail.setVersion(new Integer(1)); detail.setProcessType("delete"); List partyAssignments = new ArrayList(); partyAssignments.add(detail); input.setWorkPartyAssignment(partyAssignments); return input; } // ======================= product produced ========================= public Long testGetWorkWithProductProduced() { return (new Long(48001)); } public Work testSaveWorkWithProductProducedInsert() { Work input = new Work(); input.setWorkId(new Long(49001)); WorkProductProduced detail = new WorkProductProduced(); detail.setProductCd("WRKPRD49001"); detail.setProcessType("insert"); List productProduced = new ArrayList(); productProduced.add(detail); input.setWorkProductProduced(productProduced); return input; } public Work testSaveWorkWithProductProducedDelete() { Work input = new Work(); input.setWorkId(new Long(410001)); WorkProductProduced detail = new WorkProductProduced(); detail.setProductCd("WRKPRD410001"); detail.setVersion(new Integer(1)); detail.setProcessType("delete"); List productProduced = new ArrayList(); productProduced.add(detail); input.setWorkProductProduced(productProduced); return input; } // ======================= workRequirement ========================= public Long testGetWorkWithRequirement() { return (new Long(420001)); } public Work testSaveWorkWithRequirementInsert() { Work input = new Work(); input.setWorkId(new Long(430001)); WorkRequirement detail = new WorkRequirement(); detail.setRequirementId(new Long(430001)); detail.setProcessType("insert"); List requirements = new ArrayList(); requirements.add(detail); input.setWorkRequirement(requirements); return input; } public Work testSaveWorkWithRequirementDelete() { Work input = new Work(); input.setWorkId(new Long(440001)); WorkRequirement detail = new WorkRequirement(); detail.setRequirementId(new Long(440001)); detail.setVersion(new Integer(1)); detail.setProcessType("delete"); List requirements = new ArrayList(); requirements.add(detail); input.setWorkRequirement(requirements); return input; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -