/kickup/trunk/src/ak/kickup/core/model/EventManager.java |
---|
146,6 → 146,21 |
return new EventAct(); |
} |
public boolean allowDeleteAct(Act act) |
throws ModelException |
{ |
try { |
return ((Integer)HibernateUtil.currentSession().iterate( |
"select count(*) from EventAct where act=?", |
act, Hibernate.entity(Act.class)) |
.next()).intValue() == 0; |
} |
catch(HibernateException ex) |
{ |
throw new ModelException(ex); |
} |
} |
public EventApartment createApartment() |
throws ModelException |
{ |
152,6 → 167,35 |
return new EventApartment(); |
} |
public boolean allowDeleteApartment(Apartment apartment) |
throws ModelException |
{ |
try { |
return ((Integer)HibernateUtil.currentSession().iterate( |
"select count(*) from EventApartment where apartment=?", |
apartment, Hibernate.entity(Apartment.class)) |
.next()).intValue() == 0; |
} |
catch(HibernateException ex) |
{ |
throw new ModelException(ex); |
} |
} |
protected void deleteApartments(Apartment apartment) |
throws ModelException |
{ |
try { |
HibernateUtil.currentSession().delete( |
"from EventApartment where apartment=?", |
apartment, Hibernate.entity(Apartment.class)); |
} |
catch(HibernateException ex) |
{ |
throw new ModelException(ex); |
} |
} |
public static final Comparator NAME_COMPARATOR = new NameComparator(); |
public static final Comparator START_COMPARATOR = new StartComparator(); |
/kickup/trunk/src/ak/kickup/core/model/Participant.java |
---|
327,6 → 327,7 |
if(acts != null) { |
for(Iterator i = acts.iterator(); i.hasNext(); ) { |
ParticipantAct a = (ParticipantAct)i.next(); |
if(a.getAct() != null) |
actsMap.put(a.getAct().getId(), a); |
} |
} |
/kickup/trunk/src/ak/kickup/core/model/Event.java |
---|
274,6 → 274,7 |
if(acts != null) { |
for(Iterator i = acts.iterator(); i.hasNext(); ) { |
EventAct a = (EventAct)i.next(); |
if(a.getAct() != null) |
actsMap.put(a.getAct().getId(), a); |
} |
} |
324,6 → 325,7 |
if(apartments != null) { |
for(Iterator i = apartments.iterator(); i.hasNext(); ) { |
EventApartment a = (EventApartment)i.next(); |
if(a.getApartment() != null) |
apartmentsMap.put(a.getApartment().getId(), a); |
} |
} |
/kickup/trunk/src/ak/kickup/core/model/ParticipantManager.java |
---|
206,6 → 206,21 |
return new ParticipantAct(); |
} |
public boolean allowDeleteAct(Act act) |
throws ModelException |
{ |
try { |
return ((Integer)HibernateUtil.currentSession().iterate( |
"select count(*) from ParticipantAct where act=?", |
act, Hibernate.entity(Act.class)) |
.next()).intValue() == 0; |
} |
catch(HibernateException ex) |
{ |
throw new ModelException(ex); |
} |
} |
public static final Comparator NICK_COMPARATOR = new NickComparator(); |
private static class NickComparator |