baseturbinerole.java
来自「jetspeed源代码」· Java 代码 · 共 986 行 · 第 1/3 页
JAVA
986 行
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 TurbineRole */public abstract class BaseTurbineRole extends BaseObject{ /** The Peer class */ private static final TurbineRolePeer peer = new TurbineRolePeer(); /** The value for the roleId field */ private int roleId; /** The value for the roleName field */ private String roleName; /** The value for the objectdata field */ private byte[] objectdata; /** * Get the RoleId * @return int */ public int getRoleId() { return roleId; } /** * Set the value of RoleId */ public void setRoleId(int v ) throws TorqueException { if (this.roleId != v) { this.roleId = v; setModified(true); } // update associated TurbineRolePermission if (collTurbineRolePermissions != null ) { for (int i = 0; i < collTurbineRolePermissions.size(); i++) { ((TurbineRolePermission)collTurbineRolePermissions.get(i)) .setRoleId(v); } } // update associated TurbineUserGroupRole if (collTurbineUserGroupRoles != null ) { for (int i = 0; i < collTurbineUserGroupRoles.size(); i++) { ((TurbineUserGroupRole)collTurbineUserGroupRoles.get(i)) .setRoleId(v); } } } /** * Get the RoleName * @return String */ public String getRoleName() { return roleName; } /** * Set the value of RoleName */ public void setRoleName(String v ) { if (!ObjectUtils.equals(this.roleName, v)) { this.roleName = 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 collTurbineRolePermissions */ protected List collTurbineRolePermissions; /** * Temporary storage of collTurbineRolePermissions to save a possible db hit in * the event objects are add to the collection, but the * complete collection is never requested. */ protected void initTurbineRolePermissions() { if (collTurbineRolePermissions == null) { collTurbineRolePermissions = new ArrayList(); } } /** * Method called to associate a TurbineRolePermission object to this object * through the TurbineRolePermission foreign key attribute * * @param TurbineRolePermission l */ public void addTurbineRolePermission(TurbineRolePermission l) throws TorqueException { getTurbineRolePermissions().add(l); l.setTurbineRole((TurbineRole)this); } /** * The criteria used to select the current contents of collTurbineRolePermissions */ private Criteria lastTurbineRolePermissionsCriteria = null; /** * If this collection has already been initialized, returns * the collection. Otherwise returns the results of * getTurbineRolePermissions(new Criteria()) */ public List getTurbineRolePermissions() throws TorqueException { if (collTurbineRolePermissions == null) { collTurbineRolePermissions = getTurbineRolePermissions(new Criteria(10)); } return collTurbineRolePermissions; } /** * If this collection has already been initialized with * an identical criteria, it returns the collection. * Otherwise if this TurbineRole has previously * been saved, it will retrieve related TurbineRolePermissions from storage. * If this TurbineRole is new, it will return * an empty collection or the current collection, the criteria * is ignored on a new object. */ public List getTurbineRolePermissions(Criteria criteria) throws TorqueException { if (collTurbineRolePermissions == null) { if (isNew()) { collTurbineRolePermissions = new ArrayList(); } else { criteria.add(TurbineRolePermissionPeer.ROLE_ID, getRoleId() ); collTurbineRolePermissions = TurbineRolePermissionPeer.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(TurbineRolePermissionPeer.ROLE_ID, getRoleId() ); if (!lastTurbineRolePermissionsCriteria.equals(criteria)) { collTurbineRolePermissions = TurbineRolePermissionPeer.doSelect(criteria); } } } lastTurbineRolePermissionsCriteria = criteria; return collTurbineRolePermissions; } /** * If this collection has already been initialized, returns * the collection. Otherwise returns the results of * getTurbineRolePermissions(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 getTurbineRolePermissions(Connection con) throws TorqueException { if (collTurbineRolePermissions == null) { collTurbineRolePermissions = getTurbineRolePermissions(new Criteria(10),con); } return collTurbineRolePermissions; } /** * If this collection has already been initialized with * an identical criteria, it returns the collection. * Otherwise if this TurbineRole has previously * been saved, it will retrieve related TurbineRolePermissions from storage. * If this TurbineRole 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 getTurbineRolePermissions(Criteria criteria,Connection con) throws TorqueException { if (collTurbineRolePermissions == null) { if (isNew()) { collTurbineRolePermissions = new ArrayList(); } else { criteria.add(TurbineRolePermissionPeer.ROLE_ID, getRoleId() ); collTurbineRolePermissions = TurbineRolePermissionPeer.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(TurbineRolePermissionPeer.ROLE_ID, getRoleId() ); if (!lastTurbineRolePermissionsCriteria.equals(criteria)) { collTurbineRolePermissions = TurbineRolePermissionPeer.doSelect(criteria,con); } } } lastTurbineRolePermissionsCriteria = criteria; return collTurbineRolePermissions; } /** * If this collection has already been initialized with * an identical criteria, it returns the collection. * Otherwise if this TurbineRole is new, it will return * an empty collection; or if this TurbineRole has previously * been saved, it will retrieve related TurbineRolePermissions 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 TurbineRole. */ protected List getTurbineRolePermissionsJoinTurbineRole(Criteria criteria)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?