@Override
  protected void prepareInsert(String insertQuery, PreparedStatement insert, SpaceUserRoleRow row)
      throws SQLException {
    SilverTrace.debug(
        "admin",
        "SpaceUserRoleTable.prepareInsert",
        "root.MSG_GEN_ENTER_METHOD",
        "usr.id = "
            + row.id
            + ", usr.spaceId = "
            + row.spaceId
            + ", usr.roleName = "
            + row.roleName
            + ", usr.isInherited = "
            + row.isInherited);
    if (row.id == -1) {
      row.id = getNextId();
    }

    insert.setInt(1, row.id);
    insert.setInt(2, row.spaceId);
    insert.setString(3, truncate(row.name, 100));
    insert.setString(4, truncate(row.roleName, 100));
    insert.setString(5, truncate(row.description, 500));
    insert.setInt(6, row.isInherited);
  }
 /** Fetch the current spaceUserRole row from a resultSet. */
 protected SpaceUserRoleRow fetchSpaceUserRole(ResultSet rs) throws SQLException {
   SpaceUserRoleRow sur = new SpaceUserRoleRow();
   sur.id = rs.getInt(1);
   sur.spaceId = rs.getInt(2);
   sur.name = rs.getString(3);
   sur.roleName = rs.getString(4);
   sur.description = rs.getString(5);
   sur.isInherited = rs.getInt(6);
   return sur;
 }