public static void deleteDisciplineSetDisciplineMapping(DisciplineSetDisciplineMapping disciplineSetDisciplineMapping)
 {
     executeSql(""
         + "DELETE FROM "
             + "`" + tableName + "` "
         + "WHERE "
             + "`" + field_disciplineSetId + " = " + disciplineSetDisciplineMapping.DisciplineSetId + " "
             + "AND `" + field_ageFrom + "` = " + disciplineSetDisciplineMapping.AgeFrom + " "
             + "AND `" + field_ageUntil + "` = " + disciplineSetDisciplineMapping.AgeUntil + " "
             + "AND `" + field_disciplineId + "` = " + disciplineSetDisciplineMapping.DisciplineId + " "
         + "LIMIT 1"
     );
 }
 public void removeDisciplineSetDisciplineMapping(DisciplineSetDisciplineMapping disciplineSetDisciplineMapping)
 {
     this.disciplineSetDisciplineMappings.Remove(disciplineSetDisciplineMapping);
 }
 public void addDisciplineSetDisciplineMapping(DisciplineSetDisciplineMapping disciplineSetDisciplineMapping)
 {
     this.disciplineSetDisciplineMappings.Add(disciplineSetDisciplineMapping);
 }
 public static void updateDisciplineSetDisciplineMapping(DisciplineSetDisciplineMapping disciplineSetDisciplineMapping)
 {
     executeSql(""
         + "UPDATE "
             + "`" + tableName + "` "
         + "SET "
             + "`" + field_ageFrom + "` = " + disciplineSetDisciplineMapping.AgeFrom + ", "
             + "`" + field_ageUntil + "` = " + disciplineSetDisciplineMapping.AgeUntil + " "
         + "WHERE "
             + "`" + field_disciplineSetId + " = " + disciplineSetDisciplineMapping.DisciplineSetId + " "
             + "AND `" + field_ageFrom + "` = " + disciplineSetDisciplineMapping.AgeFrom + " "
             + "AND `" + field_ageUntil + "` = " + disciplineSetDisciplineMapping.AgeUntil + " "
             + "AND `" + field_disciplineId + "` = " + disciplineSetDisciplineMapping.DisciplineId
     );
 }
        public static DisciplineSetDisciplineMapping getDisciplineSetDisciplineMappingByPrimaryKey(
            int disciplineSetId,
            int ageFrom,
            int ageUntil,
            int disciplineId
        )
        {
            Dictionary<string, object> result = querySingleSql(""
                + "SELECT "
                    + "* "
                + "FROM "
                    + "`" + tableName + "` "
                + "WHERE "
                    + "`" + field_disciplineSetId + "` = " + disciplineSetId + " "
                    + "AND `" + field_ageFrom + "` = " + ageFrom + " "
                    + "AND `" + field_ageUntil + "` = " + ageUntil + " "
                    + "AND `" + field_disciplineId + "` = " + disciplineId
            );

            if (result == null)
            {
                return null;
            }

            DisciplineSetDisciplineMapping disciplineSetDisciplineMapping = new DisciplineSetDisciplineMapping(
                Convert.ToInt32(result[field_disciplineSetId]),
                Convert.ToInt32(result[field_ageFrom]),
                Convert.ToInt32(result[field_ageUntil]),
                Convert.ToInt32(result[field_disciplineId])
            );

            return disciplineSetDisciplineMapping;
        }
 public void removeDisciplineSetDisciplineMapping(DisciplineSetDisciplineMapping disciplineSetDisciplineMapping)
 {
     this.disciplineSetDisciplineMappings.Remove(disciplineSetDisciplineMapping);
 }
 public void addDisciplineSetDisciplineMapping(DisciplineSetDisciplineMapping disciplineSetDisciplineMapping)
 {
     this.disciplineSetDisciplineMappings.Add(disciplineSetDisciplineMapping);
 }