Korrekturen um offene ResultSets zu verhindern
git-svn-id: https://svn.libreccm.org/ccm/trunk@669 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
4b4dd00cd4
commit
715e500fe8
|
|
@ -109,6 +109,9 @@ public class GenericContact extends ContentPage implements
|
|||
collection.next();
|
||||
dobj = collection.getDataObject();
|
||||
|
||||
// Close Collection to prevent an open ResultSet
|
||||
collection.close();
|
||||
|
||||
return (GenericPerson) DomainObjectFactory.newInstance(dobj);
|
||||
}
|
||||
//return (GenericPerson) DomainObjectFactory.newInstance((DataObject)get(PERSON));
|
||||
|
|
@ -190,7 +193,12 @@ public class GenericContact extends ContentPage implements
|
|||
if(person != null) {
|
||||
GenericPersonContactCollection collection = person.getContacts();
|
||||
collection.next();
|
||||
return (String) collection.getContactType();
|
||||
String contactType = (String) collection.getContactType();
|
||||
|
||||
// Close Collection to prevent open ResultSet
|
||||
collection.close();
|
||||
|
||||
return contactType;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,12 @@ public class GenericContactEntriesTable extends Table implements TableActionList
|
|||
GenericContactEntryKeys keys = new GenericContactEntryKeys(m_contactEntry.getKey());
|
||||
keys.addLanguageFilter(DispatcherHelper.getNegotiatedLocale().getLanguage());
|
||||
if (keys.next()) {
|
||||
return keys.getName();
|
||||
Object key = keys.getName();
|
||||
|
||||
// Close Collection to prevent open ResultSet
|
||||
keys.close();
|
||||
|
||||
return key;
|
||||
}
|
||||
return m_contactEntry.getKey();
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -205,9 +205,15 @@ public class GenericPersonContactTable extends Table implements
|
|||
contacttypes.getRelationAttribute(
|
||||
m_contactCollection.getContactType(),
|
||||
lang)));
|
||||
return contacttypes.getRelationAttribute(
|
||||
|
||||
Object name = contacttypes.getRelationAttribute(
|
||||
m_contactCollection.getContactType(),
|
||||
lang).getName();
|
||||
|
||||
// Close collection to prevent open ResultSet
|
||||
contacttypes.close();
|
||||
|
||||
return name;
|
||||
case 1:
|
||||
return m_contact.getTitle();
|
||||
case 2:
|
||||
|
|
|
|||
Loading…
Reference in New Issue