baseturbinerole.java
来自「jetspeed源代码」· Java 代码 · 共 986 行 · 第 1/3 页
JAVA
986 行
throws TorqueException { if (collTurbineRolePermissions == null) { if (isNew()) { collTurbineRolePermissions = new ArrayList(); } else { criteria.add(TurbineRolePermissionPeer.ROLE_ID, getRoleId() ); collTurbineRolePermissions = TurbineRolePermissionPeer.doSelectJoinTurbineRole(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(TurbineRolePermissionPeer.ROLE_ID, getRoleId() ); if (!lastTurbineRolePermissionsCriteria.equals(criteria)) { collTurbineRolePermissions = TurbineRolePermissionPeer.doSelectJoinTurbineRole(criteria); } } 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 getTurbineRolePermissionsJoinTurbinePermission(Criteria criteria) throws TorqueException { if (collTurbineRolePermissions == null) { if (isNew()) { collTurbineRolePermissions = new ArrayList(); } else { criteria.add(TurbineRolePermissionPeer.ROLE_ID, getRoleId() ); collTurbineRolePermissions = TurbineRolePermissionPeer.doSelectJoinTurbinePermission(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(TurbineRolePermissionPeer.ROLE_ID, getRoleId() ); if (!lastTurbineRolePermissionsCriteria.equals(criteria)) { collTurbineRolePermissions = TurbineRolePermissionPeer.doSelectJoinTurbinePermission(criteria); } } lastTurbineRolePermissionsCriteria = criteria; return collTurbineRolePermissions; } /** * 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.setTurbineRole((TurbineRole)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 TurbineRole has previously * been saved, it will retrieve related TurbineUserGroupRoles 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 getTurbineUserGroupRoles(Criteria criteria) throws TorqueException { if (collTurbineUserGroupRoles == null) { if (isNew()) { collTurbineUserGroupRoles = new ArrayList(); } else { criteria.add(TurbineUserGroupRolePeer.ROLE_ID, getRoleId() ); 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.ROLE_ID, getRoleId() ); 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 TurbineRole has previously * been saved, it will retrieve related TurbineUserGroupRoles 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 getTurbineUserGroupRoles(Criteria criteria,Connection con) throws TorqueException { if (collTurbineUserGroupRoles == null) { if (isNew()) { collTurbineUserGroupRoles = new ArrayList(); } else { criteria.add(TurbineUserGroupRolePeer.ROLE_ID, getRoleId() ); 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.ROLE_ID, getRoleId() ); 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 TurbineRole is new, it will return * an empty collection; or if this TurbineRole 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 TurbineRole. */ protected List getTurbineUserGroupRolesJoinTurbineUser(Criteria criteria) throws TorqueException { if (collTurbineUserGroupRoles == null) { if (isNew()) { collTurbineUserGroupRoles = new ArrayList(); } else { criteria.add(TurbineUserGroupRolePeer.ROLE_ID, getRoleId() ); 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.ROLE_ID, getRoleId() ); if (!lastTurbineUserGroupRolesCriteria.equals(criteria)) { collTurbineUserGroupRoles = TurbineUserGroupRolePeer.doSelectJoinTurbineUser(criteria); } } lastTurbineUserGroupRolesCriteria = criteria; return collTurbineUserGroupRoles; } /** * 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 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 TurbineRole. */ protected List getTurbineUserGroupRolesJoinTurbineGroup(Criteria criteria) throws TorqueException { if (collTurbineUserGroupRoles == null) { if (isNew()) { collTurbineUserGroupRoles = new ArrayList(); } else { criteria.add(TurbineUserGroupRolePeer.ROLE_ID, getRoleId() ); collTurbineUserGroupRoles = TurbineUserGroupRolePeer.doSelectJoinTurbineGroup(criteria); }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?