HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2011-05-19 eb9c4b0a800655e75476b9e09c668cc0f8521e50
Fehlerkorrektur
3 files modified
22 ■■■■ changed files
hsarback/src/de/hsadmin/mods/cust/Customer.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/cust/CustomerModuleImpl.java 18 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/Domain.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/cust/Customer.java
@@ -95,7 +95,7 @@
    }
    public static String createQueryFromStringKey(String humanKey) {
        return "name='" + humanKey + "'";
        return "obj.name='" + humanKey + "'";
    }
    @Override
hsarback/src/de/hsadmin/mods/cust/CustomerModuleImpl.java
@@ -1,5 +1,6 @@
package de.hsadmin.mods.cust;
import java.util.Calendar;
import java.util.List;
import de.hsadmin.core.model.AbstractEntity;
@@ -59,10 +60,19 @@
            throw new HSAdminException("role hostmaster required to delete customers");
        }
        Customer cust = (Customer) existingEntity;
        GenericModuleImpl helper = new GenericModuleImpl(getTransaction());
        AbstractEntity custAccount = helper.findByString(UnixUser.class, cust.getName());
        helper.delete(custAccount);
        super.delete(existingEntity);
//        Diese Zeilen loeschen den hsh00-Mitglieds-Account
//        GenericModuleImpl helper = new GenericModuleImpl(getTransaction());
//        AbstractEntity custAccount = helper.findByString(UnixUser.class, cust.getName());
//        helper.delete(custAccount);
        Calendar cal = Calendar.getInstance();
        cal.setTimeInMillis(System.currentTimeMillis());
        cal.set(Calendar.MONTH, Calendar.DECEMBER);
        cal.set(Calendar.DAY_OF_MONTH, 31);
        cal.set(Calendar.HOUR_OF_DAY, 23);
        cal.set(Calendar.MINUTE, 59);
        cal.set(Calendar.SECOND, 59);
        cust.setMemberUntil(cal.getTime());
        super.update(existingEntity);
    }
    private void assertNotNull(String name, String value) throws HSAdminException {
hsarback/src/de/hsadmin/mods/dom/Domain.java
@@ -75,7 +75,7 @@
    }
    public static String createQueryFromStringKey(String humanKey) {
        return "name = '" + humanKey + "'";
        return "obj.name='" + humanKey + "'";
    }
    @Override