public void writeGroup(CmsDbContext dbc, CmsGroup group) throws CmsDataAccessException {

        PreparedStatement stmt = null;
        Connection conn = null;
        if (group != null) {
            try {
                conn = getSqlManager().getConnection(dbc);
                stmt = m_sqlManager.getPreparedStatement(conn, "C_GROUPS_WRITE_GROUP_4");

                stmt.setString(1, m_sqlManager.validateEmpty(group.getDescription()));
                stmt.setInt(2, group.getFlags());
                stmt.setString(3, group.getParentId().toString());
                stmt.setString(4, group.getId().toString());
                stmt.executeUpdate();

            } catch (SQLException e) {
                throw new CmsDbSqlException(
                    Messages.get().container(Messages.ERR_GENERIC_SQL_1, CmsDbSqlException.getErrorQuery(stmt)),
                    e);
            } finally {
                m_sqlManager.closeAll(dbc, conn, stmt, null);
            }
        } else {
            throw new CmsDbEntryNotFoundException(
                org.opencms.db.Messages.get().container(org.opencms.db.Messages.ERR_UNKNOWN_GROUP_1, "null"));
        }
    }
public void writeGroup ( CmsDbContext dbc , CmsGroup group ) throws CmsDataAccessException { PreparedStatement stmt = null ; Connection conn = null ; if ( group != null ) { try { conn = getSqlManager ( ) . getConnection ( dbc ) ; stmt = m_sqlManager . getPreparedStatement ( conn , "C_GROUPS_WRITE_GROUP_4" ) ; stmt . setString ( 1 , m_sqlManager . validateEmpty ( group . getDescription ( ) ) ) ; stmt . setInt ( 2 , group . getFlags ( ) ) ; stmt . setString ( 3 , group . getParentId ( ) . toString ( ) ) ; stmt . setString ( 4 , group . getId ( ) . toString ( ) ) ; stmt . executeUpdate ( ) ; } catch ( SQLException e ) { throw new CmsDbSqlException ( Messages . get ( ) . container ( Messages . ERR_GENERIC_SQL_1 , CmsDbSqlException . getErrorQuery ( stmt ) ) , e ) ; } finally { m_sqlManager . closeAll ( dbc , conn , stmt , null ) ; } } else { throw new CmsDbEntryNotFoundException ( org . opencms . db . Messages . get ( ) . container ( org . opencms . db . Messages . ERR_UNKNOWN_GROUP_1 , "null" ) ) ; } }
@see org.opencms.db.I_CmsUserDriver#writeGroup(org.opencms.db.CmsDbContext, org.opencms.file.CmsGroup)