You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2015/01/12 17:32:22 UTC

[43/52] [abbrv] [partial] syncope git commit: [SYNCOPE-620] Unit tests all in

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/RoleEntitlementUtil.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/RoleEntitlementUtil.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/RoleEntitlementUtil.java
deleted file mode 100644
index 0b9fec8..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/RoleEntitlementUtil.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.regex.Pattern;
-import org.apache.syncope.persistence.api.entity.Entitlement;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Utility class for manipulating entitlements.
- */
-public final class RoleEntitlementUtil {
-
-    private static final Pattern ROLE_ENTITLEMENT_NAME_PATTERN = Pattern.compile("^ROLE_([\\d])+");
-
-    private static final Logger LOG = LoggerFactory.getLogger(RoleEntitlementUtil.class);
-
-    public static String getEntitlementNameFromRoleKey(final Long roleKey) {
-        return "ROLE_" + roleKey;
-    }
-
-    public static boolean isRoleEntitlement(final String entitlementName) {
-        return ROLE_ENTITLEMENT_NAME_PATTERN.matcher(entitlementName).matches();
-    }
-
-    public static Long getRoleKey(final String entitlementName) {
-        Long result = null;
-
-        if (isRoleEntitlement(entitlementName)) {
-            try {
-                result = Long.valueOf(entitlementName.substring(entitlementName.indexOf('_') + 1));
-            } catch (Exception e) {
-                LOG.error("unable to parse {} to Long", entitlementName, e);
-            }
-        }
-
-        return result;
-    }
-
-    public static Set<Long> getRoleKeys(final Set<String> entitlements) {
-        Set<Long> result = new HashSet<>();
-
-        for (String entitlement : entitlements) {
-            if (isRoleEntitlement(entitlement)) {
-                Long roleId = getRoleKey(entitlement);
-                if (roleId != null) {
-                    result.add(roleId);
-                }
-            }
-        }
-
-        return result;
-    }
-
-    public static Set<Long> getRoleKeys(final List<Entitlement> entitlements) {
-        Set<String> names = new HashSet<>(entitlements.size());
-        for (Entitlement entitlement : entitlements) {
-            names.add(entitlement.getKey());
-        }
-        return getRoleKeys(names);
-    }
-
-    /**
-     * Private default constructor, for static-only classes.
-     */
-    private RoleEntitlementUtil() {
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidEntityException.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidEntityException.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidEntityException.java
deleted file mode 100644
index 2822c21..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidEntityException.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.attrvalue.validation;
-
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.ValidationException;
-import org.apache.syncope.common.lib.types.EntityViolationType;
-
-/**
- * Exception thrown when any JPA entity fails bean validation.
- */
-public class InvalidEntityException extends ValidationException {
-
-    private static final long serialVersionUID = 3249297275444409691L;
-
-    private final String entityClassSimpleName;
-
-    private final Map<Class<?>, Set<EntityViolationType>> violations = new HashMap<>();
-
-    /**
-     * Constructs a singleton map of violations from given parameters.
-     *
-     * @param entityClass class of invalid entity
-     * @param entityViolationType type of violation found
-     * @param message message to be associated to the violation
-     */
-    public InvalidEntityException(final Class<?> entityClass,
-            final EntityViolationType entityViolationType, final String message) {
-
-        super();
-
-        this.entityClassSimpleName = entityClass.getSimpleName();
-
-        entityViolationType.setMessage(message.trim());
-
-        this.violations.put(entityClass, EnumSet.noneOf(EntityViolationType.class));
-        this.violations.get(entityClass).add(entityViolationType);
-    }
-
-    /**
-     * Constructs a map of violations out of given <tt>ConstraintViolation</tt> set.
-     *
-     * @param entityClassSimpleName simple class name of invalid entity
-     * @param violations as returned by bean validation
-     */
-    public InvalidEntityException(final String entityClassSimpleName,
-            final Set<ConstraintViolation<Object>> violations) {
-
-        super();
-
-        this.entityClassSimpleName = entityClassSimpleName;
-
-        for (ConstraintViolation<Object> violation : violations) {
-            int firstComma = violation.getMessageTemplate().indexOf(';');
-
-            final String key = violation.getMessageTemplate().substring(
-                    0, firstComma > 0 ? firstComma : violation.getMessageTemplate().length());
-
-            final String message = violation.getMessageTemplate().substring(firstComma > 0 ? firstComma + 1 : 0);
-
-            EntityViolationType entityViolationType;
-
-            try {
-                entityViolationType = EntityViolationType.valueOf(key.trim());
-            } catch (IllegalArgumentException e) {
-                entityViolationType = EntityViolationType.Standard;
-            }
-
-            entityViolationType.setMessage(message.trim());
-
-            if (!this.violations.containsKey(violation.getLeafBean().getClass())) {
-                this.violations.put(violation.getLeafBean().getClass(), EnumSet.noneOf(EntityViolationType.class));
-            }
-
-            this.violations.get(violation.getLeafBean().getClass()).add(entityViolationType);
-        }
-    }
-
-    public final boolean hasViolation(final EntityViolationType type) {
-        boolean found = false;
-        for (Class<?> entity : violations.keySet()) {
-            if (violations.get(entity).contains(type)) {
-                found = true;
-            }
-        }
-
-        return found;
-    }
-
-    public String getEntityClassSimpleName() {
-        return entityClassSimpleName;
-    }
-
-    public final Map<Class<?>, Set<EntityViolationType>> getViolations() {
-        return violations;
-    }
-
-    @Override
-    public String getMessage() {
-        StringBuilder sb = new StringBuilder();
-
-        for (Class<?> entity : violations.keySet()) {
-            sb.append(entity.getSimpleName()).append(" ").append(violations.get(entity).toString()).append(", ");
-        }
-        sb.delete(sb.lastIndexOf(", "), sb.length());
-
-        return sb.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidPlainAttrValueException.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidPlainAttrValueException.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidPlainAttrValueException.java
deleted file mode 100644
index 37466e3..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidPlainAttrValueException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.attrvalue.validation;
-
-import javax.validation.ValidationException;
-import org.apache.syncope.persistence.api.entity.PlainAttrValue;
-
-public class InvalidPlainAttrValueException extends ValidationException {
-
-    private static final long serialVersionUID = -5023202610580202148L;
-
-    public InvalidPlainAttrValueException(final String errorMessage) {
-        super(errorMessage);
-    }
-
-    public InvalidPlainAttrValueException(final String errorMessage, final Throwable cause) {
-        super(errorMessage, cause);
-    }
-
-    public InvalidPlainAttrValueException(final PlainAttrValue value) {
-        this("Could not validate " + value.getValue());
-    }
-
-    public InvalidPlainAttrValueException(final PlainAttrValue value, Throwable cause) {
-        this("Could not validate " + value.getValue(), cause);
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/ParsingValidationException.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/ParsingValidationException.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/ParsingValidationException.java
deleted file mode 100644
index efb1fd9..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/ParsingValidationException.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.attrvalue.validation;
-
-import javax.validation.ValidationException;
-
-public class ParsingValidationException extends ValidationException {
-
-    private static final long serialVersionUID = 5669262895008285522L;
-
-    public ParsingValidationException(final String message, final Throwable cause) {
-        super(message, cause);
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/Validator.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/Validator.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/Validator.java
deleted file mode 100644
index bb88519..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/Validator.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.attrvalue.validation;
-
-import org.apache.syncope.persistence.api.entity.PlainAttrValue;
-
-public interface Validator {
-
-    void validate(String value, PlainAttrValue attrValue)
-            throws ParsingValidationException, InvalidPlainAttrValueException;
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentExporter.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentExporter.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentExporter.java
deleted file mode 100644
index 25b0ecd..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentExporter.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.content;
-
-import java.io.OutputStream;
-import javax.xml.transform.TransformerConfigurationException;
-import org.xml.sax.SAXException;
-
-public interface ContentExporter {
-
-    void export(OutputStream output, String wfTablePrefix) throws SAXException, TransformerConfigurationException;
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentLoader.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentLoader.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentLoader.java
deleted file mode 100644
index 2f14027..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentLoader.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.content;
-
-public interface ContentLoader {
-
-    void load();
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/AttrTemplateDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/AttrTemplateDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/AttrTemplateDAO.java
deleted file mode 100644
index e07c02c..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/AttrTemplateDAO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.entity.AttrTemplate;
-import org.apache.syncope.persistence.api.entity.Schema;
-
-public interface AttrTemplateDAO<K extends Schema> extends DAO<AttrTemplate<K>, Long> {
-
-    <T extends AttrTemplate<K>> T find(Long key, Class<T> reference);
-
-    <T extends AttrTemplate<K>> List<Number> findBySchemaName(String schemaName, Class<T> reference);
-
-    <T extends AttrTemplate<K>> void delete(Long key, Class<T> reference);
-
-    <T extends AttrTemplate<K>> void delete(T attrTemplate);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConfDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConfDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConfDAO.java
deleted file mode 100644
index 359c603..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConfDAO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import org.apache.syncope.persistence.api.entity.conf.CPlainAttr;
-import org.apache.syncope.persistence.api.entity.conf.Conf;
-
-public interface ConfDAO extends DAO<Conf, Long> {
-
-    CPlainAttr find(String key);
-
-    CPlainAttr find(String key, String defaultValue);
-
-    Conf get();
-
-    Conf save(CPlainAttr attr);
-
-    Conf delete(String key);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConnInstanceDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConnInstanceDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConnInstanceDAO.java
deleted file mode 100644
index 90c10c4..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConnInstanceDAO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.ConnInstance;
-
-public interface ConnInstanceDAO extends DAO<ConnInstance, Long> {
-
-    ConnInstance find(Long key);
-
-    List<ConnInstance> findAll();
-
-    ConnInstance save(ConnInstance connector) throws InvalidEntityException;
-
-    void delete(Long key);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DAO.java
deleted file mode 100644
index 504f7e6..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DAO.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import org.apache.syncope.persistence.api.entity.Entity;
-
-public interface DAO<E extends Entity<KEY>, KEY> {
-
-    void refresh(E entity);
-
-    void detach(E entity);
-
-    void flush();
-
-    void clear();
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerAttrDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerAttrDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerAttrDAO.java
deleted file mode 100644
index 5c8116b..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerAttrDAO.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.DerAttr;
-
-public interface DerAttrDAO extends DAO<DerAttr, Long> {
-
-    <T extends DerAttr> T find(Long key, Class<T> reference);
-
-    <T extends DerAttr> List<T> findAll(Class<T> reference);
-
-    <T extends DerAttr> T save(T derAttr) throws InvalidEntityException;
-
-    <T extends DerAttr> void delete(Long key, Class<T> reference);
-
-    <T extends DerAttr> void delete(T derAttr);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerSchemaDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerSchemaDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerSchemaDAO.java
deleted file mode 100644
index 46972a2..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerSchemaDAO.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.AttributableUtil;
-import org.apache.syncope.persistence.api.entity.DerAttr;
-import org.apache.syncope.persistence.api.entity.DerSchema;
-
-public interface DerSchemaDAO extends DAO<DerSchema, String> {
-
-    <T extends DerSchema> T find(String name, Class<T> reference);
-
-    <T extends DerSchema> List<T> findAll(Class<T> reference);
-
-    <T extends DerAttr> List<T> findAttrs(DerSchema schema, Class<T> reference);
-
-    <T extends DerSchema> T save(T derSchema) throws InvalidEntityException;
-
-    void delete(String name, AttributableUtil attributableUtil);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DuplicateException.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DuplicateException.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DuplicateException.java
deleted file mode 100644
index 517d64d..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DuplicateException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-/**
- * Thrown when something is not found.
- */
-public class DuplicateException extends RuntimeException {
-
-    private static final long serialVersionUID = -8200698688516957508L;
-
-    public DuplicateException(final String msg) {
-        super(msg);
-    }
-
-    public DuplicateException(final String msg, final Exception cause) {
-        super(msg, cause);
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/EntitlementDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/EntitlementDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/EntitlementDAO.java
deleted file mode 100644
index 8ca510b..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/EntitlementDAO.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.Entitlement;
-import org.apache.syncope.persistence.api.entity.role.Role;
-
-public interface EntitlementDAO extends DAO<Entitlement, String> {
-
-    Entitlement find(String key);
-
-    List<Entitlement> findAll();
-
-    Entitlement save(Entitlement entitlement) throws InvalidEntityException;
-
-    Entitlement saveRoleEntitlement(Role role);
-
-    void delete(String key);
-
-    void delete(Entitlement entitlement);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ExternalResourceDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ExternalResourceDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ExternalResourceDAO.java
deleted file mode 100644
index 5b3d459..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ExternalResourceDAO.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.common.lib.types.IntMappingType;
-import org.apache.syncope.common.lib.types.PolicyType;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.ExternalResource;
-import org.apache.syncope.persistence.api.entity.MappingItem;
-import org.apache.syncope.persistence.api.entity.Policy;
-
-public interface ExternalResourceDAO extends DAO<ExternalResource, String> {
-
-    ExternalResource find(String key);
-
-    List<ExternalResource> findByPolicy(Policy policy);
-
-    List<ExternalResource> findWithoutPolicy(PolicyType type);
-
-    List<ExternalResource> findAll();
-
-    List<ExternalResource> findAllByPriority();
-
-    ExternalResource save(ExternalResource resource) throws InvalidEntityException;
-
-    <T extends MappingItem> void deleteMapping(
-            String schemaName, IntMappingType intMappingType, Class<T> reference);
-
-    void delete(String key);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/LoggerDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/LoggerDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/LoggerDAO.java
deleted file mode 100644
index 13808c3..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/LoggerDAO.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.common.lib.types.LoggerType;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.Logger;
-
-public interface LoggerDAO extends DAO<Logger, String> {
-
-    Logger find(String key);
-
-    List<Logger> findAll(LoggerType type);
-
-    Logger save(Logger logger) throws InvalidEntityException;
-
-    void delete(String key);
-
-    void delete(Logger logger);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/MembershipDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/MembershipDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/MembershipDAO.java
deleted file mode 100644
index 43412fe..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/MembershipDAO.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.membership.Membership;
-import org.apache.syncope.persistence.api.entity.role.Role;
-import org.apache.syncope.persistence.api.entity.user.User;
-
-public interface MembershipDAO extends DAO<Membership, Long> {
-
-    Membership find(Long key);
-
-    Membership find(User user, Role role);
-
-    List<Membership> findAll();
-
-    Membership save(Membership membership) throws InvalidEntityException;
-
-    void delete(Long key);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NotFoundException.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NotFoundException.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NotFoundException.java
deleted file mode 100644
index 2d9326d..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NotFoundException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-/**
- * Thrown when something is not found.
- */
-public class NotFoundException extends RuntimeException {
-
-    private static final long serialVersionUID = 4810651769126663581L;
-
-    public NotFoundException(final String msg) {
-        super(msg);
-    }
-
-    public NotFoundException(final String msg, final Exception cause) {
-        super(msg, cause);
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NotificationDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NotificationDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NotificationDAO.java
deleted file mode 100644
index fadb811..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NotificationDAO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.Notification;
-
-public interface NotificationDAO extends DAO<Notification, Long> {
-
-    Notification find(Long key);
-
-    List<Notification> findAll();
-
-    Notification save(Notification notification) throws InvalidEntityException;
-
-    void delete(Long key);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrDAO.java
deleted file mode 100644
index 8b21ac2..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrDAO.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import org.apache.syncope.persistence.api.entity.PlainAttr;
-
-public interface PlainAttrDAO extends DAO<PlainAttr, Long> {
-
-    <T extends PlainAttr> T find(Long key, Class<T> reference);
-
-    <T extends PlainAttr> void delete(Long key, Class<T> reference);
-
-    <T extends PlainAttr> void delete(T attr);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrValueDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrValueDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrValueDAO.java
deleted file mode 100644
index e6d9226..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrValueDAO.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.PlainAttrValue;
-
-public interface PlainAttrValueDAO extends DAO<PlainAttrValue, Long> {
-
-    <T extends PlainAttrValue> T find(Long key, Class<T> reference);
-
-    <T extends PlainAttrValue> List<T> findAll(Class<T> reference);
-
-    <T extends PlainAttrValue> T save(T attributeValue) throws InvalidEntityException;
-
-    <T extends PlainAttrValue> void delete(Long key, Class<T> reference);
-
-    <T extends PlainAttrValue> void delete(T attributeValue);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainSchemaDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainSchemaDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainSchemaDAO.java
deleted file mode 100644
index ea9860e..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainSchemaDAO.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.AttributableUtil;
-import org.apache.syncope.persistence.api.entity.PlainAttr;
-import org.apache.syncope.persistence.api.entity.PlainSchema;
-
-public interface PlainSchemaDAO extends DAO<PlainSchema, String> {
-
-    <T extends PlainSchema> T find(String key, Class<T> reference);
-
-    <T extends PlainSchema> List<T> findAll(Class<T> reference);
-
-    <T extends PlainAttr> List<T> findAttrs(PlainSchema schema, Class<T> reference);
-
-    <T extends PlainSchema> T save(T schema) throws InvalidEntityException;
-
-    void delete(String name, AttributableUtil attributableUtil);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PolicyDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PolicyDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PolicyDAO.java
deleted file mode 100644
index 0161c23..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PolicyDAO.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.common.lib.types.PolicyType;
-import org.apache.syncope.persistence.api.entity.AccountPolicy;
-import org.apache.syncope.persistence.api.entity.ExternalResource;
-import org.apache.syncope.persistence.api.entity.PasswordPolicy;
-import org.apache.syncope.persistence.api.entity.Policy;
-import org.apache.syncope.persistence.api.entity.SyncPolicy;
-
-public interface PolicyDAO extends DAO<Policy, Long> {
-
-    <T extends Policy> T find(Long key);
-
-    <T extends Policy> List<T> find(PolicyType type);
-
-    List<AccountPolicy> findByResource(ExternalResource resource);
-
-    PasswordPolicy getGlobalPasswordPolicy();
-
-    AccountPolicy getGlobalAccountPolicy();
-
-    SyncPolicy getGlobalSyncPolicy();
-
-    List<Policy> findAll();
-
-    <T extends Policy> T save(T policy);
-
-    <T extends Policy> void delete(T policy);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportDAO.java
deleted file mode 100644
index d154534..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportDAO.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.dao.search.OrderByClause;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.Report;
-
-public interface ReportDAO extends DAO<Report, Long> {
-
-    Report find(Long key);
-
-    List<Report> findAll();
-
-    List<Report> findAll(int page, int itemsPerPage, List<OrderByClause> orderByClauses);
-
-    int count();
-
-    Report save(Report report) throws InvalidEntityException;
-
-    void delete(Long key);
-
-    void delete(Report report);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportExecDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportExecDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportExecDAO.java
deleted file mode 100644
index dc1c2bf..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportExecDAO.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.Report;
-import org.apache.syncope.persistence.api.entity.ReportExec;
-
-public interface ReportExecDAO extends DAO<ReportExec, Long> {
-
-    ReportExec find(Long key);
-
-    ReportExec findLatestStarted(Report report);
-
-    ReportExec findLatestEnded(Report report);
-
-    List<ReportExec> findAll();
-
-    ReportExec save(ReportExec execution) throws InvalidEntityException;
-
-    void delete(Long key);
-
-    void delete(ReportExec execution);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/RoleDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/RoleDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/RoleDAO.java
deleted file mode 100644
index d26615d..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/RoleDAO.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.common.lib.types.PolicyType;
-import org.apache.syncope.persistence.api.dao.search.OrderByClause;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.Entitlement;
-import org.apache.syncope.persistence.api.entity.ExternalResource;
-import org.apache.syncope.persistence.api.entity.Policy;
-import org.apache.syncope.persistence.api.entity.membership.Membership;
-import org.apache.syncope.persistence.api.entity.role.RDerAttr;
-import org.apache.syncope.persistence.api.entity.role.RPlainAttr;
-import org.apache.syncope.persistence.api.entity.role.RPlainAttrValue;
-import org.apache.syncope.persistence.api.entity.role.RVirAttr;
-import org.apache.syncope.persistence.api.entity.role.Role;
-
-public interface RoleDAO extends SubjectDAO<RPlainAttr, RDerAttr, RVirAttr> {
-
-    Role find(Long key);
-
-    List<Role> find(String name);
-
-    Role find(String name, Long parent);
-
-    List<Role> findOwnedByUser(Long userId);
-
-    List<Role> findOwnedByRole(Long roleId);
-
-    List<Role> findByEntitlement(Entitlement entitlement);
-
-    List<Role> findByPolicy(Policy policy);
-
-    List<Role> findWithoutPolicy(PolicyType type);
-
-    List<Role> findAncestors(Role role);
-
-    List<Role> findChildren(Role role);
-
-    List<Role> findDescendants(Role role);
-
-    List<Role> findByDerAttrValue(String schemaName, String value);
-
-    List<Role> findByAttrValue(String schemaName, RPlainAttrValue attrValue);
-
-    Role findByAttrUniqueValue(String schemaName, RPlainAttrValue attrUniqueValue);
-
-    List<Role> findByResource(ExternalResource resource);
-
-    List<Role> findAll();
-
-    List<Role> findAll(int page, int itemsPerPage, List<OrderByClause> orderBy);
-
-    List<Membership> findMemberships(Role role);
-
-    int count();
-
-    Role save(Role syncopeRole) throws InvalidEntityException;
-
-    void delete(Role role);
-
-    void delete(Long key);
-    
-    Role authFetchRole(Long key);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SecurityQuestionDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SecurityQuestionDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SecurityQuestionDAO.java
deleted file mode 100644
index efe1aa7..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SecurityQuestionDAO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.user.SecurityQuestion;
-
-public interface SecurityQuestionDAO extends DAO<SecurityQuestion, Long> {
-
-    SecurityQuestion find(Long key);
-
-    List<SecurityQuestion> findAll();
-
-    SecurityQuestion save(SecurityQuestion securityQuestion) throws InvalidEntityException;
-
-    void delete(Long key);
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SubjectDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SubjectDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SubjectDAO.java
deleted file mode 100644
index f542422..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SubjectDAO.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.entity.AttributableUtil;
-import org.apache.syncope.persistence.api.entity.DerAttr;
-import org.apache.syncope.persistence.api.entity.ExternalResource;
-import org.apache.syncope.persistence.api.entity.PlainAttr;
-import org.apache.syncope.persistence.api.entity.PlainAttrValue;
-import org.apache.syncope.persistence.api.entity.Subject;
-import org.apache.syncope.persistence.api.entity.VirAttr;
-
-public interface SubjectDAO<P extends PlainAttr, D extends DerAttr, V extends VirAttr>
-        extends DAO<Subject<P, D, V>, Long> {
-
-    List<? extends Subject<P, D, V>> findByAttrValue(
-            String schemaName, PlainAttrValue attrValue, AttributableUtil attrUtil);
-
-    Subject<P, D, V> findByAttrUniqueValue(
-            String schemaName, PlainAttrValue attrUniqueValue, AttributableUtil attrUtil);
-
-    List<? extends Subject<P, D, V>> findByDerAttrValue(
-            String schemaName, String value, AttributableUtil attrUtil);
-
-    List<? extends Subject<P, D, V>> findByResource(
-            ExternalResource resource, AttributableUtil attrUtil);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SubjectSearchDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SubjectSearchDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SubjectSearchDAO.java
deleted file mode 100644
index 4bb811a..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SubjectSearchDAO.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import java.util.Set;
-import org.apache.syncope.common.lib.types.SubjectType;
-import org.apache.syncope.persistence.api.dao.search.OrderByClause;
-import org.apache.syncope.persistence.api.dao.search.SearchCond;
-import org.apache.syncope.persistence.api.entity.DerAttr;
-import org.apache.syncope.persistence.api.entity.PlainAttr;
-import org.apache.syncope.persistence.api.entity.Subject;
-import org.apache.syncope.persistence.api.entity.VirAttr;
-
-public interface SubjectSearchDAO extends DAO<Subject<?, ?, ?>, Long> {
-
-    /**
-     * @param adminRoles the set of admin roles owned by the caller
-     * @param searchCondition the search condition
-     * @param type user or role
-     * @return size of search result
-     */
-    int count(Set<Long> adminRoles, SearchCond searchCondition, SubjectType type);
-
-    /**
-     * @param adminRoles the set of admin roles owned by the caller
-     * @param searchCondition the search condition
-     * @param type user or role
-     * @param <T> user/role
-     * @return the list of users/roles matching the given search condition
-     */
-    <T extends Subject<?, ?, ?>> List<T> search(
-            Set<Long> adminRoles, SearchCond searchCondition, SubjectType type);
-
-    /**
-     * @param adminRoles the set of admin roles owned by the caller
-     * @param searchCondition the search condition
-     * @param orderBy list of ordering clauses
-     * @param type user or role
-     * @param <T> user/role
-     * @return the list of users/roles matching the given search condition
-     */
-    <T extends Subject<?, ?, ?>> List<T> search(
-            Set<Long> adminRoles, SearchCond searchCondition, List<OrderByClause> orderBy, SubjectType type);
-
-    /**
-     * @param adminRoles the set of admin roles owned by the caller
-     * @param searchCondition the search condition
-     * @param page position of the first result, start from 1
-     * @param itemsPerPage number of results per page
-     * @param orderBy list of ordering clauses
-     * @param type user or role
-     * @param <T> user/role
-     * @return the list of users/roles matching the given search condition (in the given page)
-     */
-    <T extends Subject<?, ?, ?>> List<T> search(
-            Set<Long> adminRoles, SearchCond searchCondition, int page, int itemsPerPage,
-            List<OrderByClause> orderBy, SubjectType type);
-
-    /**
-     * Verify if user/role matches the given search condition.
-     *
-     * @param subject to be checked
-     * @param searchCondition to be verified
-     * @param type user or role
-     * @param <T> user/role
-     * @return true if user/role matches searchCondition
-     */
-    <T extends Subject<?, ?, ?>> boolean matches(T subject, SearchCond searchCondition, SubjectType type);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/TaskDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/TaskDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/TaskDAO.java
deleted file mode 100644
index 63e4358..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/TaskDAO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.common.lib.types.TaskType;
-import org.apache.syncope.persistence.api.dao.search.OrderByClause;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.ExternalResource;
-import org.apache.syncope.persistence.api.entity.task.Task;
-
-public interface TaskDAO extends DAO<Task, Long> {
-
-    Class<? extends Task> getEntityReference(TaskType type);
-
-    <T extends Task> T find(Long key);
-
-    <T extends Task> List<T> findToExec(TaskType type);
-
-    <T extends Task> List<T> findAll(ExternalResource resource, TaskType type);
-
-    <T extends Task> List<T> findAll(TaskType type);
-
-    <T extends Task> List<T> findAll(
-            int page, int itemsPerPage, List<OrderByClause> orderByClauses, TaskType type);
-
-    int count(TaskType type);
-
-    <T extends Task> T save(T task) throws InvalidEntityException;
-
-    void delete(Long key);
-
-    void delete(Task task);
-
-    void deleteAll(ExternalResource resource, TaskType type);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/TaskExecDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/TaskExecDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/TaskExecDAO.java
deleted file mode 100644
index 7b8d30d..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/TaskExecDAO.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.common.lib.types.TaskType;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.task.Task;
-import org.apache.syncope.persistence.api.entity.task.TaskExec;
-
-public interface TaskExecDAO extends DAO<TaskExec, Long> {
-
-    TaskExec find(Long key);
-
-    <T extends Task> TaskExec findLatestStarted(T task);
-
-    <T extends Task> TaskExec findLatestEnded(T task);
-
-    List<TaskExec> findAll(TaskType type);
-
-    TaskExec save(TaskExec execution) throws InvalidEntityException;
-
-    void saveAndAdd(Long taskId, TaskExec execution) throws InvalidEntityException;
-
-    void delete(Long key);
-
-    void delete(TaskExec execution);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/UserDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/UserDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/UserDAO.java
deleted file mode 100644
index 0f359c3..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/UserDAO.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import java.util.Set;
-import org.apache.syncope.persistence.api.dao.search.OrderByClause;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.ExternalResource;
-import org.apache.syncope.persistence.api.entity.user.SecurityQuestion;
-import org.apache.syncope.persistence.api.entity.user.UDerAttr;
-import org.apache.syncope.persistence.api.entity.user.UPlainAttr;
-import org.apache.syncope.persistence.api.entity.user.UPlainAttrValue;
-import org.apache.syncope.persistence.api.entity.user.UVirAttr;
-import org.apache.syncope.persistence.api.entity.user.User;
-
-public interface UserDAO extends SubjectDAO<UPlainAttr, UDerAttr, UVirAttr> {
-
-    User find(Long key);
-
-    User find(String username);
-
-    User findByWorkflowId(String workflowId);
-
-    User findByToken(String token);
-
-    List<User> findBySecurityQuestion(SecurityQuestion securityQuestion);
-
-    List<User> findByDerAttrValue(String schemaName, String value);
-
-    List<User> findByAttrValue(String schemaName, UPlainAttrValue attrValue);
-
-    User findByAttrUniqueValue(String schemaName, UPlainAttrValue attrUniqueValue);
-
-    List<User> findByResource(ExternalResource resource);
-
-    List<User> findAll(Set<Long> adminRoles, int page, int itemsPerPage);
-
-    List<User> findAll(Set<Long> adminRoles, int page, int itemsPerPage, List<OrderByClause> orderBy);
-
-    int count(Set<Long> adminRoles);
-
-    User save(User user) throws InvalidEntityException;
-
-    void delete(Long key);
-
-    void delete(User user);
-
-    User authFecthUser(Long key);
-
-    User authFecthUser(String username);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/VirAttrDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/VirAttrDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/VirAttrDAO.java
deleted file mode 100644
index e8df331..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/VirAttrDAO.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.VirAttr;
-
-public interface VirAttrDAO extends DAO<VirAttr, Long> {
-
-    <T extends VirAttr> T find(Long key, Class<T> reference);
-
-    <T extends VirAttr> List<T> findAll(Class<T> reference);
-
-    <T extends VirAttr> T save(T virtualAttribute) throws InvalidEntityException;
-
-    <T extends VirAttr> void delete(Long key, Class<T> reference);
-
-    <T extends VirAttr> void delete(T virAttr);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/VirSchemaDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/VirSchemaDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/VirSchemaDAO.java
deleted file mode 100644
index 41bdf0f..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/VirSchemaDAO.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.AttributableUtil;
-import org.apache.syncope.persistence.api.entity.VirAttr;
-import org.apache.syncope.persistence.api.entity.VirSchema;
-
-public interface VirSchemaDAO extends DAO<VirSchema, String> {
-
-    <T extends VirSchema> T find(String key, Class<T> reference);
-
-    <T extends VirSchema> List<T> findAll(Class<T> reference);
-
-    <T extends VirAttr> List<T> findAttrs(VirSchema virSchema, Class<T> reference);
-
-    <T extends VirSchema> T save(T virSchema) throws InvalidEntityException;
-
-    void delete(String key, AttributableUtil attributableUtil);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/search/AbstractSearchCond.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/search/AbstractSearchCond.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/search/AbstractSearchCond.java
deleted file mode 100644
index 096f2b7..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/search/AbstractSearchCond.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao.search;
-
-import java.io.Serializable;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-public abstract class AbstractSearchCond implements Serializable {
-
-    private static final long serialVersionUID = 5376869884544910804L;
-
-    @Override
-    public boolean equals(final Object obj) {
-        return EqualsBuilder.reflectionEquals(this, obj);
-    }
-
-    @Override
-    public int hashCode() {
-        return HashCodeBuilder.reflectionHashCode(this);
-    }
-
-    @Override
-    public String toString() {
-        return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
-    }
-
-    public abstract boolean isValid();
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/235f60fa/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/search/AttributeCond.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/search/AttributeCond.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/search/AttributeCond.java
deleted file mode 100644
index 7ca3a30..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/search/AttributeCond.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.persistence.api.dao.search;
-
-/**
- * Search condition to be applied when comparing attribute values.
- */
-public class AttributeCond extends AbstractSearchCond {
-
-    private static final long serialVersionUID = 3275277728404021417L;
-
-    public enum Type {
-
-        LIKE,
-        EQ,
-        GT,
-        LT,
-        GE,
-        LE,
-        ISNULL,
-        ISNOTNULL
-
-    }
-
-    private Type type;
-
-    private String schema;
-
-    private String expression;
-
-    public AttributeCond() {
-        super();
-    }
-
-    public AttributeCond(final Type conditionType) {
-        super();
-        this.type = conditionType;
-    }
-
-    public final String getExpression() {
-        return expression;
-    }
-
-    public final void setExpression(final String conditionExpression) {
-        this.expression = conditionExpression;
-    }
-
-    public final String getSchema() {
-        return schema;
-    }
-
-    public final void setSchema(final String conditionSchema) {
-        this.schema = conditionSchema;
-    }
-
-    public final Type getType() {
-        return type;
-    }
-
-    public final void setType(final Type conditionType) {
-        this.type = conditionType;
-    }
-
-    @Override
-    public final boolean isValid() {
-        return type != null && schema != null && (type == Type.ISNULL || type == Type.ISNOTNULL || expression != null);
-    }
-}