forked from Archives/Athou_commafeed
added maven embedded deployment with mvn tomee:run
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.commafeed.backend.dao;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
@@ -13,9 +14,8 @@ import com.google.common.reflect.TypeToken;
|
||||
import com.uaihebert.factory.EasyCriteriaFactory;
|
||||
import com.uaihebert.model.EasyCriteria;
|
||||
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class GenericDAO<T, K> {
|
||||
public abstract class GenericDAO<T, K> implements Serializable {
|
||||
|
||||
private TypeToken<T> type = new TypeToken<T>(getClass()) {
|
||||
};
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.commafeed.backend.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ejb.Stateless;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import com.commafeed.backend.security.PasswordEncryptionService;
|
||||
@@ -9,6 +10,7 @@ import com.commafeed.frontend.utils.ModelFactory.MF;
|
||||
import com.commafeed.model.User;
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
@Stateless
|
||||
public class UserService extends GenericDAO<User, Long> {
|
||||
|
||||
@Inject
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<persistence-unit name="primary">
|
||||
<jta-data-source>${jpa.datasource.name}</jta-data-source>
|
||||
<properties>
|
||||
<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
|
||||
<property name="hibernate.hbm2ddl.auto" value="update" />
|
||||
<property name="hibernate.show_sql" value="false" />
|
||||
<property name="toplink.ddl-generation" value="drop-and-create-tables"/>
|
||||
|
||||
Reference in New Issue
Block a user