/** * @see java.lang.Object#clone() */ @Override public Object clone() { return new CmsGroup(m_id, m_parentId, m_name, m_description, m_flags); }
/** * @see java.lang.Object#clone() */ @Override public Object clone() { return new CmsGroup(m_id, m_parentId, m_name, m_description, m_flags); }
/** * Semi-constructor to create a {@link CmsGroup} instance from a JDBC result set. * * @param res the JDBC ResultSet * @return CmsGroup the new CmsGroup object * * @throws SQLException in case the result set does not include a requested table attribute */ protected CmsGroup internalCreateGroup(ResultSet res) throws SQLException { String ou = CmsOrganizationalUnit.removeLeadingSeparator(res.getString(m_sqlManager.readQuery("C_GROUPS_GROUP_OU_0"))); String description = res.getString(m_sqlManager.readQuery("C_GROUPS_GROUP_DESCRIPTION_0")); return new CmsGroup( new CmsUUID(res.getString(m_sqlManager.readQuery("C_GROUPS_GROUP_ID_0"))), new CmsUUID(res.getString(m_sqlManager.readQuery("C_GROUPS_PARENT_GROUP_ID_0"))), ou + res.getString(m_sqlManager.readQuery("C_GROUPS_GROUP_NAME_0")), description, res.getInt(m_sqlManager.readQuery("C_GROUPS_GROUP_FLAGS_0"))); }
/** * Semi-constructor to create a {@link CmsGroup} instance from a JDBC result set. * * @param res the JDBC ResultSet * @return CmsGroup the new CmsGroup object * * @throws SQLException in case the result set does not include a requested table attribute */ protected CmsGroup internalCreateGroup(ResultSet res) throws SQLException { String ou = CmsOrganizationalUnit.removeLeadingSeparator( res.getString(m_sqlManager.readQuery("C_GROUPS_GROUP_OU_0"))); String description = res.getString(m_sqlManager.readQuery("C_GROUPS_GROUP_DESCRIPTION_0")); return new CmsGroup( new CmsUUID(res.getString(m_sqlManager.readQuery("C_GROUPS_GROUP_ID_0"))), new CmsUUID(res.getString(m_sqlManager.readQuery("C_GROUPS_PARENT_GROUP_ID_0"))), ou + res.getString(m_sqlManager.readQuery("C_GROUPS_GROUP_NAME_0")), description, res.getInt(m_sqlManager.readQuery("C_GROUPS_GROUP_FLAGS_0"))); }
/** * Reads the group of a project.<p> * * @param dbc the current database context * @param project the project to read from * * @return the group of a resource */ public CmsGroup readGroup(CmsDbContext dbc, CmsProject project) { try { return readGroup(dbc, project.getGroupId()); } catch (CmsException exc) { return new CmsGroup( CmsUUID.getNullUUID(), CmsUUID.getNullUUID(), project.getGroupId() + "", "deleted group", 0); } }
/** * Reads the manager group of a project.<p> * * @param dbc the current database context * @param project the project to read from * * @return the group of a resource */ public CmsGroup readManagerGroup(CmsDbContext dbc, CmsProject project) { try { return readGroup(dbc, project.getManagerGroupId()); } catch (CmsException exc) { // the group does not exist any more - return a dummy-group return new CmsGroup( CmsUUID.getNullUUID(), CmsUUID.getNullUUID(), project.getManagerGroupId() + "", "deleted group", 0); } }
/** * Reads the group of a project.<p> * * @param dbc the current database context * @param project the project to read from * * @return the group of a resource */ public CmsGroup readGroup(CmsDbContext dbc, CmsProject project) { try { return readGroup(dbc, project.getGroupId()); } catch (CmsException exc) { return new CmsGroup( CmsUUID.getNullUUID(), CmsUUID.getNullUUID(), project.getGroupId() + "", "deleted group", 0); } }
/** * Reads the manager group of a project.<p> * * @param dbc the current database context * @param project the project to read from * * @return the group of a resource */ public CmsGroup readManagerGroup(CmsDbContext dbc, CmsProject project) { try { return readGroup(dbc, project.getManagerGroupId()); } catch (CmsException exc) { // the group does not exist any more - return a dummy-group return new CmsGroup( CmsUUID.getNullUUID(), CmsUUID.getNullUUID(), project.getManagerGroupId() + "", "deleted group", 0); } }
stmt.executeUpdate(); group = new CmsGroup(groupId, parentId, groupFqn, description, flags); } catch (SQLException e) { throw new CmsDbSqlException(Messages.get().container(
stmt.executeUpdate(); group = new CmsGroup(groupId, parentId, groupFqn, description, flags); } catch (SQLException e) { throw new CmsDbSqlException(
/** * Semi-constructor to create a {@link CmsGroup} instance from a JDBC result set. * * @param g the group * * @return CmsGroup the new CmsGroup object */ protected CmsGroup internalCreateGroup(CmsDAOGroups g) { String ou = CmsOrganizationalUnit.removeLeadingSeparator(g.getGroupOu()); String description = g.getGroupDescription(); return new CmsGroup( new CmsUUID(g.getGroupId()), new CmsUUID(g.getParentGroupId()), ou + g.getGroupName(), description, g.getGroupFlags()); }
m_group = new CmsGroup(); setParentGroup(null);
group = new CmsGroup(groupId, parentId, groupFqn, description, flags); } catch (PersistenceException e) { throw new CmsDataAccessException(Messages.get().container(Messages.ERR_JPA_PERSITENCE_1, e), e);