baseturbinegroup.java
来自「jetspeed源代码」· Java 代码 · 共 695 行 · 第 1/2 页
JAVA
695 行
package org.apache.jetspeed.om.security.turbine;import java.math.BigDecimal;import java.sql.Connection;import java.util.ArrayList;import java.util.Collections;import java.util.Date;import java.util.List;import org.apache.commons.lang.ObjectUtils;import org.apache.torque.TorqueException;import org.apache.torque.om.BaseObject;import org.apache.torque.om.ComboKey;import org.apache.torque.om.DateKey;import org.apache.torque.om.NumberKey;import org.apache.torque.om.ObjectKey;import org.apache.torque.om.SimpleKey;import org.apache.torque.om.StringKey;import org.apache.torque.om.Persistent;import org.apache.torque.util.Criteria;import org.apache.torque.util.Transaction;/** * This class was autogenerated by Torque on: * * [Thu Apr 22 15:30:48 PDT 2004] * * You should not use this class directly. It should not even be * extended all references should be to TurbineGroup */public abstract class BaseTurbineGroup extends BaseObject{ /** The Peer class */ private static final TurbineGroupPeer peer = new TurbineGroupPeer(); /** The value for the groupId field */ private int groupId; /** The value for the groupName field */ private String groupName; /** The value for the objectdata field */ private byte[] objectdata; /** * Get the GroupId * @return int */ public int getGroupId() { return groupId; } /** * Set the value of GroupId */ public void setGroupId(int v ) throws TorqueException { if (this.groupId != v) { this.groupId = v; setModified(true); } // update associated TurbineUserGroupRole if (collTurbineUserGroupRoles != null ) { for (int i = 0; i < collTurbineUserGroupRoles.size(); i++) { ((TurbineUserGroupRole)collTurbineUserGroupRoles.get(i)) .setGroupId(v); } } } /** * Get the GroupName * @return String */ public String getGroupName() { return groupName; } /** * Set the value of GroupName */ public void setGroupName(String v ) { if (!ObjectUtils.equals(this.groupName, v)) { this.groupName = v; setModified(true); } } /** * Get the Objectdata * @return byte[] */ public byte[] getObjectdata() { return objectdata; } /** * Set the value of Objectdata */ public void setObjectdata(byte[] v ) { if (!ObjectUtils.equals(this.objectdata, v)) { this.objectdata = v; setModified(true); } } /** * Collection to store aggregation of collTurbineUserGroupRoles */ protected List collTurbineUserGroupRoles; /** * Temporary storage of collTurbineUserGroupRoles to save a possible db hit in * the event objects are add to the collection, but the * complete collection is never requested. */ protected void initTurbineUserGroupRoles() { if (collTurbineUserGroupRoles == null) { collTurbineUserGroupRoles = new ArrayList(); } } /** * Method called to associate a TurbineUserGroupRole object to this object * through the TurbineUserGroupRole foreign key attribute * * @param TurbineUserGroupRole l */ public void addTurbineUserGroupRole(TurbineUserGroupRole l) throws TorqueException { getTurbineUserGroupRoles().add(l); l.setTurbineGroup((TurbineGroup)this); } /** * The criteria used to select the current contents of collTurbineUserGroupRoles */ private Criteria lastTurbineUserGroupRolesCriteria = null; /** * If this collection has already been initialized, returns * the collection. Otherwise returns the results of * getTurbineUserGroupRoles(new Criteria()) */ public List getTurbineUserGroupRoles() throws TorqueException { if (collTurbineUserGroupRoles == null) { collTurbineUserGroupRoles = getTurbineUserGroupRoles(new Criteria(10)); } return collTurbineUserGroupRoles; } /** * If this collection has already been initialized with * an identical criteria, it returns the collection. * Otherwise if this TurbineGroup has previously * been saved, it will retrieve related TurbineUserGroupRoles from storage. * If this TurbineGroup is new, it will return * an empty collection or the current collection, the criteria * is ignored on a new object. */ public List getTurbineUserGroupRoles(Criteria criteria) throws TorqueException { if (collTurbineUserGroupRoles == null) { if (isNew()) { collTurbineUserGroupRoles = new ArrayList(); } else { criteria.add(TurbineUserGroupRolePeer.GROUP_ID, getGroupId() ); collTurbineUserGroupRoles = TurbineUserGroupRolePeer.doSelect(criteria); } } else { // criteria has no effect for a new object if (!isNew()) { // the following code is to determine if a new query is // called for. If the criteria is the same as the last // one, just return the collection. criteria.add(TurbineUserGroupRolePeer.GROUP_ID, getGroupId() ); if (!lastTurbineUserGroupRolesCriteria.equals(criteria)) { collTurbineUserGroupRoles = TurbineUserGroupRolePeer.doSelect(criteria); } } } lastTurbineUserGroupRolesCriteria = criteria; return collTurbineUserGroupRoles; } /** * If this collection has already been initialized, returns * the collection. Otherwise returns the results of * getTurbineUserGroupRoles(new Criteria(),Connection) * This method takes in the Connection also as input so that * referenced objects can also be obtained using a Connection * that is taken as input */ public List getTurbineUserGroupRoles(Connection con) throws TorqueException { if (collTurbineUserGroupRoles == null) { collTurbineUserGroupRoles = getTurbineUserGroupRoles(new Criteria(10),con); } return collTurbineUserGroupRoles; } /** * If this collection has already been initialized with * an identical criteria, it returns the collection. * Otherwise if this TurbineGroup has previously * been saved, it will retrieve related TurbineUserGroupRoles from storage. * If this TurbineGroup is new, it will return * an empty collection or the current collection, the criteria * is ignored on a new object. * This method takes in the Connection also as input so that * referenced objects can also be obtained using a Connection * that is taken as input */ public List getTurbineUserGroupRoles(Criteria criteria,Connection con) throws TorqueException { if (collTurbineUserGroupRoles == null) { if (isNew()) { collTurbineUserGroupRoles = new ArrayList(); } else { criteria.add(TurbineUserGroupRolePeer.GROUP_ID, getGroupId() ); collTurbineUserGroupRoles = TurbineUserGroupRolePeer.doSelect(criteria,con); } } else { // criteria has no effect for a new object if (!isNew()) { // the following code is to determine if a new query is // called for. If the criteria is the same as the last // one, just return the collection. criteria.add(TurbineUserGroupRolePeer.GROUP_ID, getGroupId() ); if (!lastTurbineUserGroupRolesCriteria.equals(criteria)) { collTurbineUserGroupRoles = TurbineUserGroupRolePeer.doSelect(criteria,con); } } } lastTurbineUserGroupRolesCriteria = criteria; return collTurbineUserGroupRoles; } /** * If this collection has already been initialized with * an identical criteria, it returns the collection. * Otherwise if this TurbineGroup is new, it will return * an empty collection; or if this TurbineGroup has previously * been saved, it will retrieve related TurbineUserGroupRoles from storage. * * This method is protected by default in order to keep the public * api reasonable. You can provide public methods for those you * actually need in TurbineGroup. */ protected List getTurbineUserGroupRolesJoinTurbineUser(Criteria criteria) throws TorqueException { if (collTurbineUserGroupRoles == null) { if (isNew()) { collTurbineUserGroupRoles = new ArrayList(); } else { criteria.add(TurbineUserGroupRolePeer.GROUP_ID, getGroupId() ); collTurbineUserGroupRoles = TurbineUserGroupRolePeer.doSelectJoinTurbineUser(criteria); } } else { // the following code is to determine if a new query is // called for. If the criteria is the same as the last // one, just return the collection. boolean newCriteria = true; criteria.add(TurbineUserGroupRolePeer.GROUP_ID, getGroupId() ); if (!lastTurbineUserGroupRolesCriteria.equals(criteria)) { collTurbineUserGroupRoles = TurbineUserGroupRolePeer.doSelectJoinTurbineUser(criteria); } } lastTurbineUserGroupRolesCriteria = criteria; return collTurbineUserGroupRoles;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?