}
return SUCCESS;
}
public String AddNew(){
PageCollectionDetail pColDel;
LogInformation logInfo;
if("".equalsIgnoreCase(getId())){
pColDel = new PageCollectionDetail();
logInfo = new LogInformation();
logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
logInfo.setCreateBy(sc.getCurrentUser().getId());
}else{
pColDel = (PageCollectionDetail) getManager().getById(PageCollectionDetail.class, getId());
logInfo = pColDel.getLogInformation();
}
logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
logInfo.setLastUpdateBy(sc.getCurrentUser().getId());
if(getPCol().getId() != null && !"".equalsIgnoreCase(getPCol().getId())){
pCol = (PageCollection) getManager().getById(PageCollection.class, getPCol().getId());
}else{
pCol = null;
}
if(getCollectionId() != null && !"".equalsIgnoreCase(getCollectionId())){
Collection = (ACollection) getManager().getById(ACollection.class, getCollectionId());
}else{
Collection = null;
}
pColDel.setCollection(Collection);
pColDel.setPageCollection(pCol);
pColDel.setLogInformation(logInfo);
getManager().save(pColDel);
setCollectionId("");
setCollectionDescription("");
setId("");