Commit 7e45321b by Tuukka Kivilahti

vanhat muutokset, siivoan joskus

1 parent 57f87311
Showing with 10767 additions and 306 deletions
#Sun Mar 07 12:22:07 EET 2010 #Sun Mar 07 12:30:43 EET 2010
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6 org.eclipse.jdt.core.compiler.source=1.6
......
...@@ -2,15 +2,15 @@ package fi.insomnia.bortal.beans; ...@@ -2,15 +2,15 @@ package fi.insomnia.bortal.beans;
import java.util.List; import java.util.List;
import javax.ejb.EJB;
import javax.ejb.LocalBean; import javax.ejb.LocalBean;
import javax.ejb.Stateless; import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import fi.insomnia.bortal.UserBeanLocal; import fi.insomnia.bortal.UserBeanLocal;
import fi.insomnia.bortal.facade.UserFacade;
import fi.insomnia.bortal.model.User; import fi.insomnia.bortal.model.User;
/** /**
...@@ -18,16 +18,16 @@ import fi.insomnia.bortal.model.User; ...@@ -18,16 +18,16 @@ import fi.insomnia.bortal.model.User;
*/ */
@LocalBean @LocalBean
@Stateless @Stateless
public class UserBean extends Generiimplements UserBeanLocal { public class UserBean implements UserBeanLocal {
private static final Logger logger = LoggerFactory.getLogger(UserBean.class); private static final Logger logger = LoggerFactory.getLogger(UserBean.class);
/** /**
* Java EE container injektoi t�m�n luokkamuuttujan luokan luonnin * Java EE container injektoi t�m�n luokkamuuttujan luokan luonnin
* yhteydess�. * yhteydess�.
*/ */
@PersistenceContext @EJB
private EntityManager em; private UserFacade userFacade;
/** /**
* Default constructor. * Default constructor.
*/ */
...@@ -44,26 +44,23 @@ public class UserBean extends Generiimplements UserBeanLocal { ...@@ -44,26 +44,23 @@ public class UserBean extends Generiimplements UserBeanLocal {
returnUser.setPassword(password); returnUser.setPassword(password);
// Tallennetaan olio kantaan... // Tallennetaan olio kantaan...
em.persist(returnUser); userFacade.create(returnUser);
return returnUser; return returnUser;
} }
public List<User> getUsers() { public List<User> getUsers() {
List<User> ret = em.createQuery("select u from User u", User.class) List<User> ret = userFacade.findAll();
.getResultList();
logger.info("Found {} users from database ", ret.size()); logger.info("Found {} users from database ", ret.size());
return ret; return ret;
} }
@Override @Override
public void mergeChanges(User currentUser) { public void mergeChanges(User user) {
em.merge(currentUser); userFacade.merge(user);
} }
public User getUser(String nick) { public User getUser(String nick) {
User ret = em.createQuery("select u from User u where u.nick = :name", return userFacade.findByLogin(nick);
User.class).setParameter("name", nick).getSingleResult();
return ret;
} }
} }
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.AccessRight;
@Stateless
@LocalBean
public class AccessRightFacade extends GenericFacade<AccessRight> {
@PersistenceContext
private EntityManager em;
public AccessRightFacade() {
super(AccessRight.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.AccountEvent;
@Stateless
@LocalBean
public class AccountEventFacade extends GenericFacade<AccountEvent> {
@PersistenceContext
private EntityManager em;
public AccountEventFacade() {
super(AccountEvent.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.Bill;
@Stateless
@LocalBean
public class BillFacade extends GenericFacade<Bill> {
@PersistenceContext
private EntityManager em;
public BillFacade() {
super(Bill.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.BillLine;
@Stateless
@LocalBean
public class BillLineFacade extends GenericFacade<BillLine> {
@PersistenceContext
private EntityManager em;
public BillLineFacade() {
super(BillLine.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.CardTemplate;
@Stateless
@LocalBean
public class CardTemplateFacade extends GenericFacade<CardTemplate> {
@PersistenceContext
private EntityManager em;
public CardTemplateFacade() {
super(CardTemplate.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.CompoEntry;
@Stateless
@LocalBean
public class CompoEntryFacade extends GenericFacade<CompoEntry> {
@PersistenceContext
private EntityManager em;
public CompoEntryFacade() {
super(CompoEntry.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.CompoEntryFile;
@Stateless
@LocalBean
public class CompoEntryFileFacade extends GenericFacade<CompoEntryFile> {
@PersistenceContext
private EntityManager em;
public CompoEntryFileFacade() {
super(CompoEntryFile.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.CompoEntryParticipant;
@Stateless
@LocalBean
public class CompoEntryParticipantFacade extends GenericFacade<CompoEntryParticipant> {
@PersistenceContext
private EntityManager em;
public CompoEntryParticipantFacade() {
super(CompoEntryParticipant.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.Compo;
@Stateless
@LocalBean
public class CompoFacade extends GenericFacade<Compo> {
@PersistenceContext
private EntityManager em;
public CompoFacade() {
super(Compo.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.Discount;
@Stateless
@LocalBean
public class DiscountFacade extends GenericFacade<Discount> {
@PersistenceContext
private EntityManager em;
public DiscountFacade() {
super(Discount.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.DiscountInstance;
@Stateless
@LocalBean
public class DiscountInstanceFacade extends GenericFacade<DiscountInstance> {
@PersistenceContext
private EntityManager em;
public DiscountInstanceFacade() {
super(DiscountInstance.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.Event;
@Stateless
@LocalBean
public class EventFacade extends GenericFacade<Event> {
@PersistenceContext
private EntityManager em;
public EventFacade() {
super(Event.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.EventMap;
@Stateless
@LocalBean
public class EventMapFacade extends GenericFacade<EventMap> {
@PersistenceContext
private EntityManager em;
public EventMapFacade() {
super(EventMap.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.EventSettings;
@Stateless
@LocalBean
public class EventSettingsFacade extends GenericFacade<EventSettings> {
@PersistenceContext
private EntityManager em;
public EventSettingsFacade() {
super(EventSettings.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.EventStatus;
@Stateless
@LocalBean
public class EventStatusFacade extends GenericFacade<EventStatus> {
@PersistenceContext
private EntityManager em;
public EventStatusFacade() {
super(EventStatus.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.FoodWave;
@Stateless
@LocalBean
public class FoodWaveFacade extends GenericFacade<FoodWave> {
@PersistenceContext
private EntityManager em;
public FoodWaveFacade() {
super(FoodWave.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.FoodWaveTemplate;
@Stateless
@LocalBean
public class FoodWaveTemplateFacade extends GenericFacade<FoodWaveTemplate> {
@PersistenceContext
private EntityManager em;
public FoodWaveTemplateFacade() {
super(FoodWaveTemplate.class);
}
protected EntityManager getEm() {
return em;
}
}
...@@ -14,8 +14,16 @@ import fi.insomnia.bortal.model.ModelInterface; ...@@ -14,8 +14,16 @@ import fi.insomnia.bortal.model.ModelInterface;
*/ */
public abstract class GenericFacade<T extends ModelInterface> implements GenericFacadeLocal<T> { public abstract class GenericFacade<T extends ModelInterface> implements GenericFacadeLocal<T> {
protected abstract Class<T> getEntityClass(); private Class<T> entClass;
public GenericFacade(Class<T>entityClass)
{
this.entClass = entityClass;
}
protected Class<T> getEntityClass()
{
return entClass;
}
protected abstract EntityManager getEm(); protected abstract EntityManager getEm();
public void create(T entity) { public void create(T entity) {
......
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.GroupMembership;
@Stateless
@LocalBean
public class GroupMembershipFacade extends GenericFacade<GroupMembership> {
@PersistenceContext
private EntityManager em;
public GroupMembershipFacade() {
super(GroupMembership.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.Location;
@Stateless
@LocalBean
public class LocationFacade extends GenericFacade<Location> {
@PersistenceContext
private EntityManager em;
public LocationFacade() {
super(Location.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.LogEntry;
@Stateless
@LocalBean
public class LogEntryFacade extends GenericFacade<LogEntry> {
@PersistenceContext
private EntityManager em;
public LogEntryFacade() {
super(LogEntry.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.LogEntryType;
@Stateless
@LocalBean
public class LogEntryTypeFacade extends GenericFacade<LogEntryType> {
@PersistenceContext
private EntityManager em;
public LogEntryTypeFacade() {
super(LogEntryType.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.ModelInterface;
@Stateless
@LocalBean
public class ModelInterfaceFacade extends GenericFacade<ModelInterface> {
@PersistenceContext
private EntityManager em;
public ModelInterfaceFacade() {
super(ModelInterface.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.News;
@Stateless
@LocalBean
public class NewsFacade extends GenericFacade<News> {
@PersistenceContext
private EntityManager em;
public NewsFacade() {
super(News.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.NewsGroup;
@Stateless
@LocalBean
public class NewsGroupFacade extends GenericFacade<NewsGroup> {
@PersistenceContext
private EntityManager em;
public NewsGroupFacade() {
super(NewsGroup.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.Place;
@Stateless
@LocalBean
public class PlaceFacade extends GenericFacade<Place> {
@PersistenceContext
private EntityManager em;
public PlaceFacade() {
super(Place.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.PlaceGroup;
@Stateless
@LocalBean
public class PlaceGroupFacade extends GenericFacade<PlaceGroup> {
@PersistenceContext
private EntityManager em;
public PlaceGroupFacade() {
super(PlaceGroup.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.PrintedCard;
@Stateless
@LocalBean
public class PrintedCardFacade extends GenericFacade<PrintedCard> {
@PersistenceContext
private EntityManager em;
public PrintedCardFacade() {
super(PrintedCard.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.Product;
@Stateless
@LocalBean
public class ProductFacade extends GenericFacade<Product> {
@PersistenceContext
private EntityManager em;
public ProductFacade() {
super(Product.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.ReaderEvent;
@Stateless
@LocalBean
public class ReaderEventFacade extends GenericFacade<ReaderEvent> {
@PersistenceContext
private EntityManager em;
public ReaderEventFacade() {
super(ReaderEvent.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.Reader;
@Stateless
@LocalBean
public class ReaderFacade extends GenericFacade<Reader> {
@PersistenceContext
private EntityManager em;
public ReaderFacade() {
super(Reader.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.Role;
@Stateless
@LocalBean
public class RoleFacade extends GenericFacade<Role> {
@PersistenceContext
private EntityManager em;
public RoleFacade() {
super(Role.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.RoleInheritance;
@Stateless
@LocalBean
public class RoleInheritanceFacade extends GenericFacade<RoleInheritance> {
@PersistenceContext
private EntityManager em;
public RoleInheritanceFacade() {
super(RoleInheritance.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.RoleRight;
@Stateless
@LocalBean
public class RoleRightFacade extends GenericFacade<RoleRight> {
@PersistenceContext
private EntityManager em;
public RoleRightFacade() {
super(RoleRight.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
import fi.insomnia.bortal.model.User;
@Stateless
@LocalBean
public class UserFacade extends GenericFacade<User> {
@PersistenceContext
private EntityManager em;
public UserFacade() {
super(User.class);
}
protected EntityManager getEm() {
return em;
}
public User findByLogin(String login) {
TypedQuery<User> q = em.createNamedQuery("User.findByLogin",User.class);
q.setParameter(":login", login);
return q.getSingleResult();
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.UserImage;
@Stateless
@LocalBean
public class UserImageFacade extends GenericFacade<UserImage> {
@PersistenceContext
private EntityManager em;
public UserImageFacade() {
super(UserImage.class);
}
protected EntityManager getEm() {
return em;
}
}
package fi.insomnia.bortal.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import fi.insomnia.bortal.model.Vote;
@Stateless
@LocalBean
public class VoteFacade extends GenericFacade<Vote> {
@PersistenceContext
private EntityManager em;
public VoteFacade() {
super(Vote.class);
}
protected EntityManager getEm() {
return em;
}
}
#Sun Mar 07 02:21:24 EET 2010 #Sun Mar 07 12:30:50 EET 2010
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.compliance=1.5
...@@ -75,7 +75,7 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true ...@@ -75,7 +75,7 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
org.eclipse.jdt.core.formatter.indentation.size=4 org.eclipse.jdt.core.formatter.indentation.size=8
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
...@@ -248,18 +248,18 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constan ...@@ -248,18 +248,18 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constan
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_lines_in_comments=true
org.eclipse.jdt.core.formatter.join_wrapped_lines=true org.eclipse.jdt.core.formatter.join_wrapped_lines=false
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.jdt.core.formatter.lineSplit=80 org.eclipse.jdt.core.formatter.lineSplit=9999
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=mixed org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=8 org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
#Sun Mar 07 02:21:24 EET 2010 #Sun Mar 07 12:30:50 EET 2010
eclipse.preferences.version=1 eclipse.preferences.version=1
formatter_profile=org.eclipse.jdt.ui.default.sun_profile formatter_profile=_InsomniaConventions
formatter_settings_version=11 formatter_settings_version=11
#Sun Mar 07 02:14:35 EET 2010 #Sun Mar 07 12:30:58 EET 2010
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
...@@ -80,7 +80,7 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true ...@@ -80,7 +80,7 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
org.eclipse.jdt.core.formatter.indentation.size=4 org.eclipse.jdt.core.formatter.indentation.size=8
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
...@@ -253,18 +253,18 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constan ...@@ -253,18 +253,18 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constan
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_lines_in_comments=true
org.eclipse.jdt.core.formatter.join_wrapped_lines=true org.eclipse.jdt.core.formatter.join_wrapped_lines=false
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.jdt.core.formatter.lineSplit=80 org.eclipse.jdt.core.formatter.lineSplit=9999
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=mixed org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=8 org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
#Sun Mar 07 02:14:35 EET 2010 #Sun Mar 07 12:30:58 EET 2010
cleanup_settings_version=2 cleanup_settings_version=2
eclipse.preferences.version=1 eclipse.preferences.version=1
formatter_profile=org.eclipse.jdt.ui.default.sun_profile formatter_profile=_InsomniaConventions
formatter_settings_version=11 formatter_settings_version=11
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
/**
* An access privilege such as a privilege to login or to work with compos.
*/
@Entity
@Table(name = "access_rights")
@NamedQueries( {
@NamedQuery(name = "AccessRight.findAll", query = "SELECT a FROM AccessRight a"),
@NamedQuery(name = "AccessRight.findByAccessRightsId", query = "SELECT a FROM AccessRight a WHERE a.accessRightsId = :accessRightsId"),
@NamedQuery(name = "AccessRight.findByAccessRight", query = "SELECT a FROM AccessRight a WHERE a.accessRight = :accessRight") })
public class AccessRight implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "access_rights_id", nullable = false)
private Integer accessRightsId;
@Column(name = "access_right", nullable = false)
private String accessRight;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "accessRightsId")
private List<NewsGroup> newsGroupList;
@OneToMany(mappedBy = "accessRightsId")
private List<RoleRight> roleRightList;
public AccessRight() {
}
public AccessRight(Integer accessRightsId) {
this.accessRightsId = accessRightsId;
}
public AccessRight(Integer accessRightsId, String accessRight) {
this.accessRightsId = accessRightsId;
this.accessRight = accessRight;
}
public Integer getAccessRightsId() {
return accessRightsId;
}
public void setAccessRightsId(Integer accessRightsId) {
this.accessRightsId = accessRightsId;
}
public String getAccessRight() {
return accessRight;
}
public void setAccessRight(String accessRight) {
this.accessRight = accessRight;
}
public List<NewsGroup> getNewsGroupList() {
return newsGroupList;
}
public void setNewsGroupList(List<NewsGroup> newsGroupList) {
this.newsGroupList = newsGroupList;
}
public List<RoleRight> getRoleRightList() {
return roleRightList;
}
public void setRoleRightList(List<RoleRight> roleRightList) {
this.roleRightList = roleRightList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (accessRightsId != null ? accessRightsId.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof AccessRight)) {
return false;
}
AccessRight other = (AccessRight) object;
if ((this.accessRightsId == null && other.accessRightsId != null)
|| (this.accessRightsId != null && !this.accessRightsId
.equals(other.accessRightsId))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.AccessRight[accessRightsId="
+ accessRightsId + "]";
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "account_events")
@NamedQueries( {
@NamedQuery(name = "AccountEvent.findAll", query = "SELECT a FROM AccountEvent a"),
@NamedQuery(name = "AccountEvent.findByAccountEventsId", query = "SELECT a FROM AccountEvent a WHERE a.accountEventsId = :accountEventsId"),
@NamedQuery(name = "AccountEvent.findByUnitPrice", query = "SELECT a FROM AccountEvent a WHERE a.unitPrice = :unitPrice"),
@NamedQuery(name = "AccountEvent.findByUnitCount", query = "SELECT a FROM AccountEvent a WHERE a.unitCount = :unitCount"),
@NamedQuery(name = "AccountEvent.findByEventTime", query = "SELECT a FROM AccountEvent a WHERE a.eventTime = :eventTime"),
@NamedQuery(name = "AccountEvent.findByDelivered", query = "SELECT a FROM AccountEvent a WHERE a.delivered = :delivered") })
public class AccountEvent implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "account_events_id", nullable = false)
vvvvvvvvvvvvvvvvvvvv
private Integer accountEventsId;
^^^^^^^^^^^^^^^^^^^^
@Column(name = "unit_price", nullable = false)
private BigInteger unitPrice;
@Column(name = "unit_count", nullable = false)
private int unitCount;
@Column(name = "event_time", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date eventTime;
@Column(name = "delivered")
@Temporal(TemporalType.TIMESTAMP)
private Date delivered;
@JoinColumn(name = "food_waves_id", referencedColumnName = "food_waves_id")
@ManyToOne
private FoodWave foodWavesId;
@JoinColumn(name = "products_id", referencedColumnName = "products_id", nullable = false)
@ManyToOne(optional = false)
private Product productsId;
@JoinColumn(name = "users_id", referencedColumnName = "users_id", nullable = false)
@ManyToOne(optional = false)
private User usersId;
@OneToMany(mappedBy = "accountEventsId")
private List<DiscountInstance> discountInstanceList;
@OneToMany(mappedBy = "accoutEventsId")
private List<Bill> billList;
public AccountEvent() {
}
public AccountEvent(Integer accountEventsId) {
this.accountEventsId = accountEventsId;
}
public AccountEvent(Integer accountEventsId, BigInteger unitPrice,
int unitCount, Date eventTime) {
this.accountEventsId = accountEventsId;
this.unitPrice = unitPrice;
this.unitCount = unitCount;
this.eventTime = eventTime;
}
public Integer getAccountEventsId() {
return accountEventsId;
}
public void setAccountEventsId(Integer accountEventsId) {
this.accountEventsId = accountEventsId;
}
public BigInteger getUnitPrice() {
return unitPrice;
}
public void setUnitPrice(BigInteger unitPrice) {
this.unitPrice = unitPrice;
}
public int getUnitCount() {
return unitCount;
}
public void setUnitCount(int unitCount) {
this.unitCount = unitCount;
}
public Date getEventTime() {
return eventTime;
}
public void setEventTime(Date eventTime) {
this.eventTime = eventTime;
}
public Date getDelivered() {
return delivered;
}
public void setDelivered(Date delivered) {
this.delivered = delivered;
}
public FoodWave getFoodWavesId() {
return foodWavesId;
}
public void setFoodWavesId(FoodWave foodWavesId) {
this.foodWavesId = foodWavesId;
}
public Product getProductsId() {
return productsId;
}
public void setProductsId(Product productsId) {
this.productsId = productsId;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
}
public List<DiscountInstance> getDiscountInstanceList() {
return discountInstanceList;
}
public void setDiscountInstanceList(
List<DiscountInstance> discountInstanceList) {
this.discountInstanceList = discountInstanceList;
}
public List<Bill> getBillList() {
return billList;
}
public void setBillList(List<Bill> billList) {
this.billList = billList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (accountEventsId != null ? accountEventsId.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof AccountEvent)) {
return false;
}
AccountEvent other = (AccountEvent) object;
if ((this.accountEventsId == null && other.accountEventsId != null)
|| (this.accountEventsId != null && !this.accountEventsId
.equals(other.accountEventsId))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.AccountEvent[accountEventsId="
+ accountEventsId + "]";
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Version;
/**
* An access privilege such as a privilege to login or to work with compos.
*/
@Entity
@Table(name = "access_rights")
@NamedQueries( {
@NamedQuery(name = "AccessRight.findAll", query = "SELECT a FROM AccessRight a"),
@NamedQuery(name = "AccessRight.findByAccessRightsId", query = "SELECT a FROM AccessRight a WHERE a.accessRightsId = :accessRightsId"),
@NamedQuery(name = "AccessRight.findByAccessRight", query = "SELECT a FROM AccessRight a WHERE a.accessRight = :accessRight") })
public class AccessRight implements Serializable {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/AccessRight.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "access_rights_id", nullable = false)
private Integer accessRightsId;
@Column(name = "access_right", nullable = false)
private String accessRight;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "accessRightsId")
private List<NewsGroup> newsGroupList;
@OneToMany(mappedBy = "accessRightsId")
private List<RoleRight> roleRightList;
public AccessRight() {
}
public AccessRight(Integer accessRightsId) {
this.accessRightsId = accessRightsId;
}
public AccessRight(Integer accessRightsId, String accessRight) {
this.accessRightsId = accessRightsId;
this.accessRight = accessRight;
}
public Integer getAccessRightsId() {
return accessRightsId;
}
public void setAccessRightsId(Integer accessRightsId) {
this.accessRightsId = accessRightsId;
}
public String getAccessRight() {
return accessRight;
}
public void setAccessRight(String accessRight) {
this.accessRight = accessRight;
}
public List<NewsGroup> getNewsGroupList() {
return newsGroupList;
}
public void setNewsGroupList(List<NewsGroup> newsGroupList) {
this.newsGroupList = newsGroupList;
}
public List<RoleRight> getRoleRightList() {
return roleRightList;
}
public void setRoleRightList(List<RoleRight> roleRightList) {
this.roleRightList = roleRightList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (accessRightsId != null ? accessRightsId.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof AccessRight)) {
return false;
}
AccessRight other = (AccessRight) object;
if ((this.accessRightsId == null && other.accessRightsId != null)
|| (this.accessRightsId != null && !this.accessRightsId
.equals(other.accessRightsId))) {
return false;
=======
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "access_rights_id", nullable = false)
private Integer id;
@Basic(optional = false)
@Column(name = "access_right", nullable = false)
private String accessRight;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "accessRightsId")
private List<NewsGroup> newsGroupList;
@OneToMany(mappedBy = "accessRightsId")
private List<RoleRight> roleRightList;
@Version
@Column(nullable = false)
private int jpaVersionField;
public AccessRight() {
}
public AccessRight(Integer accessRightsId) {
this.id = accessRightsId;
}
public AccessRight(Integer accessRightsId, String accessRight) {
this.id = accessRightsId;
this.accessRight = accessRight;
}
public String getAccessRight() {
return accessRight;
}
public void setAccessRight(String accessRight) {
this.accessRight = accessRight;
}
public List<NewsGroup> getNewsGroupList() {
return newsGroupList;
}
public void setNewsGroupList(List<NewsGroup> newsGroupList) {
this.newsGroupList = newsGroupList;
}
public List<RoleRight> getRoleRightList() {
return roleRightList;
}
public void setRoleRightList(List<RoleRight> roleRightList) {
this.roleRightList = roleRightList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof AccessRight)) {
return false;
}
AccessRight other = (AccessRight) object;
if ((this.id == null && other.id != null)
|| (this.id != null && !this.id
.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.AccessRight[accessRightsId="
+ id + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/AccessRight.java
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.AccessRight[accessRightsId="
+ accessRightsId + "]";
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
/**
* An access privilege such as a privilege to login or to work with compos.
*/
@Entity
@Table(name = "access_rights")
@NamedQueries( {
@NamedQuery(name = "AccessRight.findAll", query = "SELECT a FROM AccessRight a"),
@NamedQuery(name = "AccessRight.findByAccessRightsId", query = "SELECT a FROM AccessRight a WHERE a.accessRightsId = :accessRightsId"),
@NamedQuery(name = "AccessRight.findByAccessRight", query = "SELECT a FROM AccessRight a WHERE a.accessRight = :accessRight") })
public class AccessRight implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "access_rights_id", nullable = false)
private Integer accessRightsId;
@Basic(optional = false)
@Column(name = "access_right", nullable = false)
private String accessRight;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "accessRightsId")
private List<NewsGroup> newsGroupList;
@OneToMany(mappedBy = "accessRightsId")
private List<RoleRight> roleRightList;
public AccessRight() {
}
public AccessRight(Integer accessRightsId) {
this.accessRightsId = accessRightsId;
}
public AccessRight(Integer accessRightsId, String accessRight) {
this.accessRightsId = accessRightsId;
this.accessRight = accessRight;
}
public Integer getAccessRightsId() {
return accessRightsId;
}
public void setAccessRightsId(Integer accessRightsId) {
this.accessRightsId = accessRightsId;
}
public String getAccessRight() {
return accessRight;
}
public void setAccessRight(String accessRight) {
this.accessRight = accessRight;
}
public List<NewsGroup> getNewsGroupList() {
return newsGroupList;
}
public void setNewsGroupList(List<NewsGroup> newsGroupList) {
this.newsGroupList = newsGroupList;
}
public List<RoleRight> getRoleRightList() {
return roleRightList;
}
public void setRoleRightList(List<RoleRight> roleRightList) {
this.roleRightList = roleRightList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (accessRightsId != null ? accessRightsId.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof AccessRight)) {
return false;
}
AccessRight other = (AccessRight) object;
if ((this.accessRightsId == null && other.accessRightsId != null)
|| (this.accessRightsId != null && !this.accessRightsId
.equals(other.accessRightsId))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.AccessRight[accessRightsId="
+ accessRightsId + "]";
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
/**
* An access privilege such as a privilege to login or to work with compos.
*/
@Entity
@Table(name = "access_rights")
@NamedQueries( {
@NamedQuery(name = "AccessRight.findAll", query = "SELECT a FROM AccessRight a"),
@NamedQuery(name = "AccessRight.findByAccessRightsId", query = "SELECT a FROM AccessRight a WHERE a.accessRightsId = :accessRightsId"),
@NamedQuery(name = "AccessRight.findByAccessRight", query = "SELECT a FROM AccessRight a WHERE a.accessRight = :accessRight") })
public class AccessRight implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "access_rights_id", nullable = false)
private Integer accessRightsId;
@Column(name = "access_right", nullable = false)
private String accessRight;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "accessRightsId")
private List<NewsGroup> newsGroupList;
@OneToMany(mappedBy = "accessRightsId")
private List<RoleRight> roleRightList;
public AccessRight() {
}
public AccessRight(Integer accessRightsId) {
this.accessRightsId = accessRightsId;
}
public AccessRight(Integer accessRightsId, String accessRight) {
this.accessRightsId = accessRightsId;
this.accessRight = accessRight;
}
public Integer getAccessRightsId() {
return accessRightsId;
}
public void setAccessRightsId(Integer accessRightsId) {
this.accessRightsId = accessRightsId;
}
public String getAccessRight() {
return accessRight;
}
public void setAccessRight(String accessRight) {
this.accessRight = accessRight;
}
public List<NewsGroup> getNewsGroupList() {
return newsGroupList;
}
public void setNewsGroupList(List<NewsGroup> newsGroupList) {
this.newsGroupList = newsGroupList;
}
public List<RoleRight> getRoleRightList() {
return roleRightList;
}
public void setRoleRightList(List<RoleRight> roleRightList) {
this.roleRightList = roleRightList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (accessRightsId != null ? accessRightsId.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof AccessRight)) {
return false;
}
AccessRight other = (AccessRight) object;
if ((this.accessRightsId == null && other.accessRightsId != null)
|| (this.accessRightsId != null && !this.accessRightsId
.equals(other.accessRightsId))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.AccessRight[accessRightsId="
+ accessRightsId + "]";
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Version;
/**
* An access privilege such as a privilege to login or to work with compos.
*/
@Entity
@Table(name = "access_rights")
@NamedQueries( {
@NamedQuery(name = "AccessRight.findAll", query = "SELECT a FROM AccessRight a"),
@NamedQuery(name = "AccessRight.findByAccessRightsId", query = "SELECT a FROM AccessRight a WHERE a.accessRightsId = :accessRightsId"),
@NamedQuery(name = "AccessRight.findByAccessRight", query = "SELECT a FROM AccessRight a WHERE a.accessRight = :accessRight") })
public class AccessRight implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "access_rights_id", nullable = false)
private Integer id;
@Basic(optional = false)
@Column(name = "access_right", nullable = false)
private String accessRight;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "accessRightsId")
private List<NewsGroup> newsGroupList;
@OneToMany(mappedBy = "accessRightsId")
private List<RoleRight> roleRightList;
@Version
@Column(nullable = false)
private int jpaVersionField;
public AccessRight() {
}
public AccessRight(Integer accessRightsId) {
this.id = accessRightsId;
}
public AccessRight(Integer accessRightsId, String accessRight) {
this.id = accessRightsId;
this.accessRight = accessRight;
}
public String getAccessRight() {
return accessRight;
}
public void setAccessRight(String accessRight) {
this.accessRight = accessRight;
}
public List<NewsGroup> getNewsGroupList() {
return newsGroupList;
}
public void setNewsGroupList(List<NewsGroup> newsGroupList) {
this.newsGroupList = newsGroupList;
}
public List<RoleRight> getRoleRightList() {
return roleRightList;
}
public void setRoleRightList(List<RoleRight> roleRightList) {
this.roleRightList = roleRightList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof AccessRight)) {
return false;
}
AccessRight other = (AccessRight) object;
if ((this.id == null && other.id != null)
|| (this.id != null && !this.id
.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.AccessRight[accessRightsId="
+ id + "]";
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Version;
/**
* An access privilege such as a privilege to login or to work with compos.
*/
@Entity
@Table(name = "access_rights")
@NamedQueries( {
@NamedQuery(name = "AccessRight.findAll", query = "SELECT a FROM AccessRight a"),
@NamedQuery(name = "AccessRight.findByAccessRightsId", query = "SELECT a FROM AccessRight a WHERE a.accessRightsId = :accessRightsId"),
@NamedQuery(name = "AccessRight.findByAccessRight", query = "SELECT a FROM AccessRight a WHERE a.accessRight = :accessRight") })
public class AccessRight implements Serializable {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/AccessRight.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "access_rights_id", nullable = false)
private Integer accessRightsId;
@Column(name = "access_right", nullable = false)
private String accessRight;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "accessRightsId")
private List<NewsGroup> newsGroupList;
@OneToMany(mappedBy = "accessRightsId")
private List<RoleRight> roleRightList;
public AccessRight() {
}
public AccessRight(Integer accessRightsId) {
this.accessRightsId = accessRightsId;
}
public AccessRight(Integer accessRightsId, String accessRight) {
this.accessRightsId = accessRightsId;
this.accessRight = accessRight;
}
public Integer getAccessRightsId() {
return accessRightsId;
}
public void setAccessRightsId(Integer accessRightsId) {
this.accessRightsId = accessRightsId;
}
public String getAccessRight() {
return accessRight;
}
public void setAccessRight(String accessRight) {
this.accessRight = accessRight;
}
public List<NewsGroup> getNewsGroupList() {
return newsGroupList;
}
public void setNewsGroupList(List<NewsGroup> newsGroupList) {
this.newsGroupList = newsGroupList;
}
public List<RoleRight> getRoleRightList() {
return roleRightList;
}
public void setRoleRightList(List<RoleRight> roleRightList) {
this.roleRightList = roleRightList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (accessRightsId != null ? accessRightsId.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof AccessRight)) {
return false;
}
AccessRight other = (AccessRight) object;
if ((this.accessRightsId == null && other.accessRightsId != null)
|| (this.accessRightsId != null && !this.accessRightsId
.equals(other.accessRightsId))) {
return false;
=======
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "access_rights_id", nullable = false)
private Integer id;
@Basic(optional = false)
@Column(name = "access_right", nullable = false)
private String accessRight;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "accessRightsId")
private List<NewsGroup> newsGroupList;
@OneToMany(mappedBy = "accessRightsId")
private List<RoleRight> roleRightList;
@Version
@Column(nullable = false)
private int jpaVersionField;
public AccessRight() {
}
public AccessRight(Integer accessRightsId) {
this.id = accessRightsId;
}
public AccessRight(Integer accessRightsId, String accessRight) {
this.id = accessRightsId;
this.accessRight = accessRight;
}
public String getAccessRight() {
return accessRight;
}
public void setAccessRight(String accessRight) {
this.accessRight = accessRight;
}
public List<NewsGroup> getNewsGroupList() {
return newsGroupList;
}
public void setNewsGroupList(List<NewsGroup> newsGroupList) {
this.newsGroupList = newsGroupList;
}
public List<RoleRight> getRoleRightList() {
return roleRightList;
}
public void setRoleRightList(List<RoleRight> roleRightList) {
this.roleRightList = roleRightList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof AccessRight)) {
return false;
}
AccessRight other = (AccessRight) object;
if ((this.id == null && other.id != null)
|| (this.id != null && !this.id
.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.AccessRight[accessRightsId="
+ id + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/AccessRight.java
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.AccessRight[accessRightsId="
+ accessRightsId + "]";
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "account_events")
@NamedQueries( {
@NamedQuery(name = "AccountEvent.findAll", query = "SELECT a FROM AccountEvent a"),
@NamedQuery(name = "AccountEvent.findByAccountEventsId", query = "SELECT a FROM AccountEvent a WHERE a.accountEventsId = :accountEventsId"),
@NamedQuery(name = "AccountEvent.findByUnitPrice", query = "SELECT a FROM AccountEvent a WHERE a.unitPrice = :unitPrice"),
@NamedQuery(name = "AccountEvent.findByUnitCount", query = "SELECT a FROM AccountEvent a WHERE a.unitCount = :unitCount"),
@NamedQuery(name = "AccountEvent.findByEventTime", query = "SELECT a FROM AccountEvent a WHERE a.eventTime = :eventTime"),
@NamedQuery(name = "AccountEvent.findByDelivered", query = "SELECT a FROM AccountEvent a WHERE a.delivered = :delivered") })
public class AccountEvent implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "account_events_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/AccountEvent.java
private Integer accountEventsId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/AccountEvent.java
@Column(name = "unit_price", nullable = false)
private BigInteger unitPrice;
@Column(name = "unit_count", nullable = false)
private int unitCount;
@Column(name = "event_time", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date eventTime;
@Column(name = "delivered")
@Temporal(TemporalType.TIMESTAMP)
private Date delivered;
@JoinColumn(name = "food_waves_id", referencedColumnName = "food_waves_id")
@ManyToOne
private FoodWave foodWavesId;
@JoinColumn(name = "products_id", referencedColumnName = "products_id", nullable = false)
@ManyToOne(optional = false)
private Product productsId;
@JoinColumn(name = "users_id", referencedColumnName = "users_id", nullable = false)
@ManyToOne(optional = false)
private User usersId;
@OneToMany(mappedBy = "accountEventsId")
private List<DiscountInstance> discountInstanceList;
@OneToMany(mappedBy = "accoutEventsId")
private List<Bill> billList;
@Version
@Column(nullable = false)
private int jpaVersionField;
public AccountEvent() {
}
public AccountEvent(Integer accountEventsId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/AccountEvent.java
this.accountEventsId = accountEventsId;
}
public AccountEvent(Integer accountEventsId, BigInteger unitPrice,
int unitCount, Date eventTime) {
this.accountEventsId = accountEventsId;
this.unitPrice = unitPrice;
this.unitCount = unitCount;
this.eventTime = eventTime;
}
public Integer getAccountEventsId() {
return accountEventsId;
}
public void setAccountEventsId(Integer accountEventsId) {
this.accountEventsId = accountEventsId;
}
=======
this.id = accountEventsId;
}
public AccountEvent(Integer accountEventsId, BigInteger unitPrice, int unitCount, Date eventTime) {
this.id = accountEventsId;
this.unitPrice = unitPrice;
this.unitCount = unitCount;
this.eventTime = eventTime;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/AccountEvent.java
public BigInteger getUnitPrice() {
return unitPrice;
}
public void setUnitPrice(BigInteger unitPrice) {
this.unitPrice = unitPrice;
}
public int getUnitCount() {
return unitCount;
}
public void setUnitCount(int unitCount) {
this.unitCount = unitCount;
}
public Date getEventTime() {
return eventTime;
}
public void setEventTime(Date eventTime) {
this.eventTime = eventTime;
}
public Date getDelivered() {
return delivered;
}
public void setDelivered(Date delivered) {
this.delivered = delivered;
}
public FoodWave getFoodWavesId() {
return foodWavesId;
}
public void setFoodWavesId(FoodWave foodWavesId) {
this.foodWavesId = foodWavesId;
}
public Product getProductsId() {
return productsId;
}
public void setProductsId(Product productsId) {
this.productsId = productsId;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
}
public List<DiscountInstance> getDiscountInstanceList() {
return discountInstanceList;
}
public void setDiscountInstanceList(
List<DiscountInstance> discountInstanceList) {
this.discountInstanceList = discountInstanceList;
}
public List<Bill> getBillList() {
return billList;
}
public void setBillList(List<Bill> billList) {
this.billList = billList;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/AccountEvent.java
int hash = 0;
hash += (accountEventsId != null ? accountEventsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/AccountEvent.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/AccountEvent.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof AccountEvent)) {
return false;
}
AccountEvent other = (AccountEvent) object;
if ((this.accountEventsId == null && other.accountEventsId != null)
|| (this.accountEventsId != null && !this.accountEventsId
.equals(other.accountEventsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof AccountEvent)) {
return false;
}
AccountEvent other = (AccountEvent) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/AccountEvent.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/AccountEvent.java
return "fi.insomnia.bortal.model.AccountEvent[accountEventsId="
+ accountEventsId + "]";
=======
return "fi.insomnia.bortal.model.AccountEvent[accountEventsId=" + id + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/AccountEvent.java
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
*
* @author jkj
*/
@Entity
@Table(name = "bills")
@NamedQueries( {
@NamedQuery(name = "Bill.findAll", query = "SELECT b FROM Bill b"),
@NamedQuery(name = "Bill.findByBillsId", query = "SELECT b FROM Bill b WHERE b.billsId = :billsId"),
@NamedQuery(name = "Bill.findByDueDate", query = "SELECT b FROM Bill b WHERE b.dueDate = :dueDate"),
@NamedQuery(name = "Bill.findByPaidDate", query = "SELECT b FROM Bill b WHERE b.paidDate = :paidDate"),
@NamedQuery(name = "Bill.findByReferenceNumber", query = "SELECT b FROM Bill b WHERE b.referenceNumber = :referenceNumber"),
@NamedQuery(name = "Bill.findByNotes", query = "SELECT b FROM Bill b WHERE b.notes = :notes") })
public class Bill implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "bills_id", nullable = false)
private Integer id;
@Column(name = "due_date")
@Temporal(TemporalType.TIMESTAMP)
private Date dueDate;
@Column(name = "paid_date")
@Temporal(TemporalType.TIMESTAMP)
private Date paidDate;
@Column(name = "reference_number")
private String referenceNumber;
@Column(name = "notes")
private String notes;
@OneToMany(mappedBy = "billsId")
private List<BillLine> billLineList;
@JoinColumn(name = "accout_events_id", referencedColumnName = "account_events_id")
@ManyToOne
private AccountEvent accoutEventsId;
@JoinColumn(name = "users_id", referencedColumnName = "users_id", nullable = false)
@ManyToOne(optional = false)
private User usersId;
@Version
@Column(nullable = false)
private int jpaVersionField;
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
public Bill(Integer billsId) {
this.billsId = billsId;
}
public Integer getBillsId() {
return billsId;
}
public void setBillsId(Integer billsId) {
this.billsId = billsId;
=======
public Bill() {
}
public Bill(Integer billsId) {
this.id = billsId;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
}
public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
public Date getPaidDate() {
return paidDate;
}
public void setPaidDate(Date paidDate) {
this.paidDate = paidDate;
}
public String getReferenceNumber() {
return referenceNumber;
}
public void setReferenceNumber(String referenceNumber) {
this.referenceNumber = referenceNumber;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
public List<BillLine> getBillLineList() {
return billLineList;
}
public void setBillLineList(List<BillLine> billLineList) {
this.billLineList = billLineList;
}
public AccountEvent getAccoutEventsId() {
return accoutEventsId;
}
public void setAccoutEventsId(AccountEvent accoutEventsId) {
this.accoutEventsId = accoutEventsId;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
int hash = 0;
hash += (billsId != null ? billsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Bill)) {
return false;
}
Bill other = (Bill) object;
if ((this.billsId == null && other.billsId != null)
|| (this.billsId != null && !this.billsId.equals(other.billsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Bill)) {
return false;
}
Bill other = (Bill) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
return "fi.insomnia.bortal.model.Bill[billsId=" + billsId + "]";
=======
return "fi.insomnia.bortal.model.Bill[billsId=" + id + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
*
* @author jkj
*/
@Entity
@Table(name = "bills")
@NamedQueries({
@NamedQuery(name = "Bill.findAll", query = "SELECT b FROM Bill b"),
@NamedQuery(name = "Bill.findByBillsId", query = "SELECT b FROM Bill b WHERE b.billsId = :billsId"),
@NamedQuery(name = "Bill.findByDueDate", query = "SELECT b FROM Bill b WHERE b.dueDate = :dueDate"),
@NamedQuery(name = "Bill.findByPaidDate", query = "SELECT b FROM Bill b WHERE b.paidDate = :paidDate"),
@NamedQuery(name = "Bill.findByReferenceNumber", query = "SELECT b FROM Bill b WHERE b.referenceNumber = :referenceNumber"),
@NamedQuery(name = "Bill.findByNotes", query = "SELECT b FROM Bill b WHERE b.notes = :notes")})
public class Bill implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "bills_id", nullable = false)
private Integer billsId;
@Column(name = "due_date")
@Temporal(TemporalType.TIMESTAMP)
private Date dueDate;
@Column(name = "paid_date")
@Temporal(TemporalType.TIMESTAMP)
private Date paidDate;
@Column(name = "reference_number", length = 2147483647)
private String referenceNumber;
@Column(name = "notes", length = 2147483647)
private String notes;
@OneToMany(mappedBy = "billsId")
private List<BillLine> billLineList;
@JoinColumn(name = "accout_events_id", referencedColumnName = "account_events_id")
@ManyToOne
private AccountEvent accoutEventsId;
@JoinColumn(name = "users_id", referencedColumnName = "users_id", nullable = false)
@ManyToOne(optional = false)
private User usersId;
public Bill() {
}
public Bill(Integer billsId) {
this.billsId = billsId;
}
public Integer getBillsId() {
return billsId;
}
public void setBillsId(Integer billsId) {
this.billsId = billsId;
}
public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
public Date getPaidDate() {
return paidDate;
}
public void setPaidDate(Date paidDate) {
this.paidDate = paidDate;
}
public String getReferenceNumber() {
return referenceNumber;
}
public void setReferenceNumber(String referenceNumber) {
this.referenceNumber = referenceNumber;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
public List<BillLine> getBillLineList() {
return billLineList;
}
public void setBillLineList(List<BillLine> billLineList) {
this.billLineList = billLineList;
}
public AccountEvent getAccoutEventsId() {
return accoutEventsId;
}
public void setAccoutEventsId(AccountEvent accoutEventsId) {
this.accoutEventsId = accoutEventsId;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (billsId != null ? billsId.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Bill)) {
return false;
}
Bill other = (Bill) object;
if ((this.billsId == null && other.billsId != null) || (this.billsId != null && !this.billsId.equals(other.billsId))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.Bill[billsId=" + billsId + "]";
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
*
* @author jkj
*/
@Entity
@Table(name = "bills")
@NamedQueries( {
@NamedQuery(name = "Bill.findAll", query = "SELECT b FROM Bill b"),
@NamedQuery(name = "Bill.findByBillsId", query = "SELECT b FROM Bill b WHERE b.billsId = :billsId"),
@NamedQuery(name = "Bill.findByDueDate", query = "SELECT b FROM Bill b WHERE b.dueDate = :dueDate"),
@NamedQuery(name = "Bill.findByPaidDate", query = "SELECT b FROM Bill b WHERE b.paidDate = :paidDate"),
@NamedQuery(name = "Bill.findByReferenceNumber", query = "SELECT b FROM Bill b WHERE b.referenceNumber = :referenceNumber"),
@NamedQuery(name = "Bill.findByNotes", query = "SELECT b FROM Bill b WHERE b.notes = :notes") })
public class Bill implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "bills_id", nullable = false)
private Integer billsId;
@Column(name = "due_date")
@Temporal(TemporalType.TIMESTAMP)
private Date dueDate;
@Column(name = "paid_date")
@Temporal(TemporalType.TIMESTAMP)
private Date paidDate;
@Column(name = "reference_number")
private String referenceNumber;
@Column(name = "notes")
private String notes;
@OneToMany(mappedBy = "billsId")
private List<BillLine> billLineList;
@JoinColumn(name = "accout_events_id", referencedColumnName = "account_events_id")
@ManyToOne
private AccountEvent accoutEventsId;
@JoinColumn(name = "users_id", referencedColumnName = "users_id", nullable = false)
@ManyToOne(optional = false)
private User usersId;
public Bill() {
}
public Bill(Integer billsId) {
this.billsId = billsId;
}
public Integer getBillsId() {
return billsId;
}
public void setBillsId(Integer billsId) {
this.billsId = billsId;
}
public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
public Date getPaidDate() {
return paidDate;
}
public void setPaidDate(Date paidDate) {
this.paidDate = paidDate;
}
public String getReferenceNumber() {
return referenceNumber;
}
public void setReferenceNumber(String referenceNumber) {
this.referenceNumber = referenceNumber;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
public List<BillLine> getBillLineList() {
return billLineList;
}
public void setBillLineList(List<BillLine> billLineList) {
this.billLineList = billLineList;
}
public AccountEvent getAccoutEventsId() {
return accoutEventsId;
}
public void setAccoutEventsId(AccountEvent accoutEventsId) {
this.accoutEventsId = accoutEventsId;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (billsId != null ? billsId.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Bill)) {
return false;
}
Bill other = (Bill) object;
if ((this.billsId == null && other.billsId != null)
|| (this.billsId != null && !this.billsId.equals(other.billsId))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.Bill[billsId=" + billsId + "]";
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
*
* @author jkj
*/
@Entity
@Table(name = "bills")
@NamedQueries({
@NamedQuery(name = "Bill.findAll", query = "SELECT b FROM Bill b"),
@NamedQuery(name = "Bill.findByBillsId", query = "SELECT b FROM Bill b WHERE b.billsId = :billsId"),
@NamedQuery(name = "Bill.findByDueDate", query = "SELECT b FROM Bill b WHERE b.dueDate = :dueDate"),
@NamedQuery(name = "Bill.findByPaidDate", query = "SELECT b FROM Bill b WHERE b.paidDate = :paidDate"),
@NamedQuery(name = "Bill.findByReferenceNumber", query = "SELECT b FROM Bill b WHERE b.referenceNumber = :referenceNumber"),
@NamedQuery(name = "Bill.findByNotes", query = "SELECT b FROM Bill b WHERE b.notes = :notes")})
public class Bill implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "bills_id", nullable = false)
private Integer id;
@Column(name = "due_date")
@Temporal(TemporalType.TIMESTAMP)
private Date dueDate;
@Column(name = "paid_date")
@Temporal(TemporalType.TIMESTAMP)
private Date paidDate;
@Column(name = "reference_number", length = 2147483647)
private String referenceNumber;
@Column(name = "notes", length = 2147483647)
private String notes;
@OneToMany(mappedBy = "billsId")
private List<BillLine> billLineList;
@JoinColumn(name = "accout_events_id", referencedColumnName = "account_events_id")
@ManyToOne
private AccountEvent accoutEventsId;
@JoinColumn(name = "users_id", referencedColumnName = "users_id", nullable = false)
@ManyToOne(optional = false)
private User usersId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public Bill() {
}
public Bill(Integer billsId) {
this.id = billsId;
}
public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
public Date getPaidDate() {
return paidDate;
}
public void setPaidDate(Date paidDate) {
this.paidDate = paidDate;
}
public String getReferenceNumber() {
return referenceNumber;
}
public void setReferenceNumber(String referenceNumber) {
this.referenceNumber = referenceNumber;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
public List<BillLine> getBillLineList() {
return billLineList;
}
public void setBillLineList(List<BillLine> billLineList) {
this.billLineList = billLineList;
}
public AccountEvent getAccoutEventsId() {
return accoutEventsId;
}
public void setAccoutEventsId(AccountEvent accoutEventsId) {
this.accoutEventsId = accoutEventsId;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Bill)) {
return false;
}
Bill other = (Bill) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.Bill[billsId=" + id + "]";
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
*
* @author jkj
*/
@Entity
@Table(name = "bills")
@NamedQueries( {
@NamedQuery(name = "Bill.findAll", query = "SELECT b FROM Bill b"),
@NamedQuery(name = "Bill.findByBillsId", query = "SELECT b FROM Bill b WHERE b.billsId = :billsId"),
@NamedQuery(name = "Bill.findByDueDate", query = "SELECT b FROM Bill b WHERE b.dueDate = :dueDate"),
@NamedQuery(name = "Bill.findByPaidDate", query = "SELECT b FROM Bill b WHERE b.paidDate = :paidDate"),
@NamedQuery(name = "Bill.findByReferenceNumber", query = "SELECT b FROM Bill b WHERE b.referenceNumber = :referenceNumber"),
@NamedQuery(name = "Bill.findByNotes", query = "SELECT b FROM Bill b WHERE b.notes = :notes") })
public class Bill implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "bills_id", nullable = false)
private Integer id;
@Column(name = "due_date")
@Temporal(TemporalType.TIMESTAMP)
private Date dueDate;
@Column(name = "paid_date")
@Temporal(TemporalType.TIMESTAMP)
private Date paidDate;
@Column(name = "reference_number")
private String referenceNumber;
@Column(name = "notes")
private String notes;
@OneToMany(mappedBy = "billsId")
private List<BillLine> billLineList;
@JoinColumn(name = "accout_events_id", referencedColumnName = "account_events_id")
@ManyToOne
private AccountEvent accoutEventsId;
@JoinColumn(name = "users_id", referencedColumnName = "users_id", nullable = false)
@ManyToOne(optional = false)
private User usersId;
@Version
@Column(nullable = false)
private int jpaVersionField;
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
public Bill(Integer billsId) {
this.billsId = billsId;
}
public Integer getBillsId() {
return billsId;
}
public void setBillsId(Integer billsId) {
this.billsId = billsId;
=======
public Bill() {
}
public Bill(Integer billsId) {
this.id = billsId;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
}
public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
public Date getPaidDate() {
return paidDate;
}
public void setPaidDate(Date paidDate) {
this.paidDate = paidDate;
}
public String getReferenceNumber() {
return referenceNumber;
}
public void setReferenceNumber(String referenceNumber) {
this.referenceNumber = referenceNumber;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
public List<BillLine> getBillLineList() {
return billLineList;
}
public void setBillLineList(List<BillLine> billLineList) {
this.billLineList = billLineList;
}
public AccountEvent getAccoutEventsId() {
return accoutEventsId;
}
public void setAccoutEventsId(AccountEvent accoutEventsId) {
this.accoutEventsId = accoutEventsId;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
int hash = 0;
hash += (billsId != null ? billsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Bill)) {
return false;
}
Bill other = (Bill) object;
if ((this.billsId == null && other.billsId != null)
|| (this.billsId != null && !this.billsId.equals(other.billsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Bill)) {
return false;
}
Bill other = (Bill) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
return "fi.insomnia.bortal.model.Bill[billsId=" + billsId + "]";
=======
return "fi.insomnia.bortal.model.Bill[billsId=" + id + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
*
* @author jkj
*/
@Entity
@Table(name = "bill_lines")
@NamedQueries( {
@NamedQuery(name = "BillLine.findAll", query = "SELECT b FROM BillLine b"),
@NamedQuery(name = "BillLine.findByBillLinesId", query = "SELECT b FROM BillLine b WHERE b.billLinesId = :billLinesId"),
@NamedQuery(name = "BillLine.findByProduct", query = "SELECT b FROM BillLine b WHERE b.product = :product"),
@NamedQuery(name = "BillLine.findByUnits", query = "SELECT b FROM BillLine b WHERE b.units = :units"),
@NamedQuery(name = "BillLine.findByUnitPrice", query = "SELECT b FROM BillLine b WHERE b.unitPrice = :unitPrice"),
@NamedQuery(name = "BillLine.findByVat", query = "SELECT b FROM BillLine b WHERE b.vat = :vat") })
public class BillLine implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "bill_lines_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/BillLine.java
private Integer billLinesId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/BillLine.java
@Column(name = "product", nullable = false, length = 2147483647)
private String product;
@Column(name = "units", nullable = false)
private int units;
@Column(name = "unit_price", nullable = false)
private float unitPrice;
@Column(name = "vat", nullable = false)
private float vat;
@JoinColumn(name = "bills_id", referencedColumnName = "bills_id")
@ManyToOne
private Bill billsId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public BillLine() {
}
public BillLine(Integer billLinesId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/BillLine.java
this.billLinesId = billLinesId;
}
public BillLine(Integer billLinesId, String product, int units,
float unitPrice, float vat) {
this.billLinesId = billLinesId;
this.product = product;
this.units = units;
this.unitPrice = unitPrice;
this.vat = vat;
}
public Integer getBillLinesId() {
return billLinesId;
}
public void setBillLinesId(Integer billLinesId) {
this.billLinesId = billLinesId;
}
=======
this.id = billLinesId;
}
public BillLine(Integer billLinesId, String product, int units, float unitPrice, float vat) {
this.id = billLinesId;
this.product = product;
this.units = units;
this.unitPrice = unitPrice;
this.vat = vat;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/BillLine.java
public String getProduct() {
return product;
}
public void setProduct(String product) {
this.product = product;
}
public int getUnits() {
return units;
}
public void setUnits(int units) {
this.units = units;
}
public float getUnitPrice() {
return unitPrice;
}
public void setUnitPrice(float unitPrice) {
this.unitPrice = unitPrice;
}
public float getVat() {
return vat;
}
public void setVat(float vat) {
this.vat = vat;
}
public Bill getBillsId() {
return billsId;
}
public void setBillsId(Bill billsId) {
this.billsId = billsId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/BillLine.java
int hash = 0;
hash += (billLinesId != null ? billLinesId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/BillLine.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/BillLine.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof BillLine)) {
return false;
}
BillLine other = (BillLine) object;
if ((this.billLinesId == null && other.billLinesId != null)
|| (this.billLinesId != null && !this.billLinesId
.equals(other.billLinesId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof BillLine)) {
return false;
}
BillLine other = (BillLine) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/BillLine.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/BillLine.java
return "fi.insomnia.bortal.model.BillLine[billLinesId=" + billLinesId
+ "]";
=======
return "fi.insomnia.bortal.model.BillLine[billLinesId=" + id + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/BillLine.java
}
}
...@@ -48,6 +48,9 @@ public class CardTemplate implements ModelInterface { ...@@ -48,6 +48,9 @@ public class CardTemplate implements ModelInterface {
@OneToMany(mappedBy = "cardTemplate") @OneToMany(mappedBy = "cardTemplate")
private List<Role> roles; private List<Role> roles;
@OneToMany(mappedBy = "cardTemplate")
private List<PrintedCard> cards;
@Version @Version
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
...@@ -139,4 +142,12 @@ public class CardTemplate implements ModelInterface { ...@@ -139,4 +142,12 @@ public class CardTemplate implements ModelInterface {
return jpaVersionField; return jpaVersionField;
} }
public void setCards(List<PrintedCard> cards) {
this.cards = cards;
}
public List<PrintedCard> getCards() {
return cards;
}
} }
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
/**
*
* @author jkj
*/
@Entity
@Table(name = "card_templates")
@NamedQueries( {
@NamedQuery(name = "CardTemplate.findAll", query = "SELECT c FROM CardTemplate c"),
@NamedQuery(name = "CardTemplate.findByCardTemplatesId", query = "SELECT c FROM CardTemplate c WHERE c.cardTemplatesId = :cardTemplatesId"),
@NamedQuery(name = "CardTemplate.findByTemplateName", query = "SELECT c FROM CardTemplate c WHERE c.templateName = :templateName") })
public class CardTemplate implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "card_templates_id", nullable = false)
private Integer id;
@Lob
@Column(name = "template_image")
private byte[] templateImage;
@Column(name = "template_name", nullable = false, length = 2147483647)
private String templateName;
@JoinColumn(name = "events_id", referencedColumnName = "events_id")
@ManyToOne
private Event eventsId;
@OneToMany(mappedBy = "cardTemplatesId")
private List<Role> roleList;
@Version
@Column(nullable = false)
private int jpaVersionField;
public CardTemplate() {
}
public CardTemplate(Integer cardTemplatesId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CardTemplate.java
this.cardTemplatesId = cardTemplatesId;
}
public CardTemplate(Integer cardTemplatesId, String templateName) {
this.cardTemplatesId = cardTemplatesId;
this.templateName = templateName;
}
public Integer getCardTemplatesId() {
return cardTemplatesId;
}
public void setCardTemplatesId(Integer cardTemplatesId) {
this.cardTemplatesId = cardTemplatesId;
}
=======
this.id = cardTemplatesId;
}
public CardTemplate(Integer cardTemplatesId, String templateName) {
this.id = cardTemplatesId;
this.templateName = templateName;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CardTemplate.java
public byte[] getTemplateImage() {
return templateImage;
}
public void setTemplateImage(byte[] templateImage) {
this.templateImage = templateImage;
}
public String getTemplateName() {
return templateName;
}
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
public Event getEventsId() {
return eventsId;
}
public void setEventsId(Event eventsId) {
this.eventsId = eventsId;
}
public List<Role> getRoleList() {
return roleList;
}
public void setRoleList(List<Role> roleList) {
this.roleList = roleList;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CardTemplate.java
int hash = 0;
hash += (cardTemplatesId != null ? cardTemplatesId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CardTemplate.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CardTemplate.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof CardTemplate)) {
return false;
}
CardTemplate other = (CardTemplate) object;
if ((this.cardTemplatesId == null && other.cardTemplatesId != null)
|| (this.cardTemplatesId != null && !this.cardTemplatesId
.equals(other.cardTemplatesId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof CardTemplate)) {
return false;
}
CardTemplate other = (CardTemplate) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CardTemplate.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CardTemplate.java
return "fi.insomnia.bortal.model.CardTemplate[cardTemplatesId="
+ cardTemplatesId + "]";
=======
return "fi.insomnia.bortal.model.CardTemplate[cardTemplatesId=" + id + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CardTemplate.java
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
*
* @author jkj
*/
@Entity
@Table(name = "compos")
@NamedQueries( {
@NamedQuery(name = "Compo.findAll", query = "SELECT c FROM Compo c"),
@NamedQuery(name = "Compo.findByComposId", query = "SELECT c FROM Compo c WHERE c.composId = :composId"),
@NamedQuery(name = "Compo.findByCompoName", query = "SELECT c FROM Compo c WHERE c.compoName = :compoName"),
@NamedQuery(name = "Compo.findByCompoStart", query = "SELECT c FROM Compo c WHERE c.compoStart = :compoStart"),
@NamedQuery(name = "Compo.findByVoteStart", query = "SELECT c FROM Compo c WHERE c.voteStart = :voteStart"),
@NamedQuery(name = "Compo.findByVoteEnd", query = "SELECT c FROM Compo c WHERE c.voteEnd = :voteEnd"),
@NamedQuery(name = "Compo.findBySubmitStart", query = "SELECT c FROM Compo c WHERE c.submitStart = :submitStart"),
@NamedQuery(name = "Compo.findBySubmitEnd", query = "SELECT c FROM Compo c WHERE c.submitEnd = :submitEnd"),
@NamedQuery(name = "Compo.findByHoldVoting", query = "SELECT c FROM Compo c WHERE c.holdVoting = :holdVoting") })
public class Compo implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "compos_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Compo.java
private Integer composId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Compo.java
@Column(name = "compo_name", nullable = false, length = 2147483647)
private String compoName;
@Column(name = "compo_start")
@Temporal(TemporalType.TIMESTAMP)
private Date compoStart;
@Column(name = "vote_start")
@Temporal(TemporalType.TIMESTAMP)
private Date voteStart;
@Column(name = "vote_end")
@Temporal(TemporalType.TIMESTAMP)
private Date voteEnd;
@Column(name = "submit_start")
@Temporal(TemporalType.TIMESTAMP)
private Date submitStart;
@Column(name = "submit_end")
@Temporal(TemporalType.TIMESTAMP)
private Date submitEnd;
@Column(name = "hold_voting", nullable = false)
private boolean holdVoting;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "composId")
private List<CompoEntry> compoEntryList;
@JoinColumn(name = "events_id", referencedColumnName = "events_id", nullable = false)
@ManyToOne(optional = false)
private Event eventsId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public Compo() {
}
public Compo(Integer composId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Compo.java
this.composId = composId;
}
public Compo(Integer composId, String compoName, boolean holdVoting) {
this.composId = composId;
this.compoName = compoName;
this.holdVoting = holdVoting;
}
public Integer getComposId() {
return composId;
}
public void setComposId(Integer composId) {
this.composId = composId;
}
=======
this.id = composId;
}
public Compo(Integer composId, String compoName, boolean holdVoting) {
this.id = composId;
this.compoName = compoName;
this.holdVoting = holdVoting;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Compo.java
public String getCompoName() {
return compoName;
}
public void setCompoName(String compoName) {
this.compoName = compoName;
}
public Date getCompoStart() {
return compoStart;
}
public void setCompoStart(Date compoStart) {
this.compoStart = compoStart;
}
public Date getVoteStart() {
return voteStart;
}
public void setVoteStart(Date voteStart) {
this.voteStart = voteStart;
}
public Date getVoteEnd() {
return voteEnd;
}
public void setVoteEnd(Date voteEnd) {
this.voteEnd = voteEnd;
}
public Date getSubmitStart() {
return submitStart;
}
public void setSubmitStart(Date submitStart) {
this.submitStart = submitStart;
}
public Date getSubmitEnd() {
return submitEnd;
}
public void setSubmitEnd(Date submitEnd) {
this.submitEnd = submitEnd;
}
public boolean getHoldVoting() {
return holdVoting;
}
public void setHoldVoting(boolean holdVoting) {
this.holdVoting = holdVoting;
}
public List<CompoEntry> getCompoEntryList() {
return compoEntryList;
}
public void setCompoEntryList(List<CompoEntry> compoEntryList) {
this.compoEntryList = compoEntryList;
}
public Event getEventsId() {
return eventsId;
}
public void setEventsId(Event eventsId) {
this.eventsId = eventsId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Compo.java
int hash = 0;
hash += (composId != null ? composId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Compo.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Compo.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Compo)) {
return false;
}
Compo other = (Compo) object;
if ((this.composId == null && other.composId != null)
|| (this.composId != null && !this.composId
.equals(other.composId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Compo)) {
return false;
}
Compo other = (Compo) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Compo.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Compo.java
return "fi.insomnia.bortal.model.Compo[composId=" + composId + "]";
=======
return "fi.insomnia.bortal.model.Compo[composId=" + id + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Compo.java
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
*
* @author jkj
*/
@Entity
@Table(name = "entries")
@NamedQueries( {
@NamedQuery(name = "CompoEntry.findAll", query = "SELECT c FROM CompoEntry c"),
@NamedQuery(name = "CompoEntry.findByEntriesId", query = "SELECT c FROM CompoEntry c WHERE c.entriesId = :entriesId"),
@NamedQuery(name = "CompoEntry.findByEntryCreated", query = "SELECT c FROM CompoEntry c WHERE c.entryCreated = :entryCreated"),
@NamedQuery(name = "CompoEntry.findByEntryName", query = "SELECT c FROM CompoEntry c WHERE c.entryName = :entryName"),
@NamedQuery(name = "CompoEntry.findByNotes", query = "SELECT c FROM CompoEntry c WHERE c.notes = :notes"),
@NamedQuery(name = "CompoEntry.findByScreenMessage", query = "SELECT c FROM CompoEntry c WHERE c.screenMessage = :screenMessage"),
@NamedQuery(name = "CompoEntry.findBySort", query = "SELECT c FROM CompoEntry c WHERE c.sort = :sort") })
public class CompoEntry implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "entries_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntry.java
private Integer entriesId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntry.java
@Column(name = "entry_created", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date entryCreated;
@Column(name = "entry_name", nullable = false, length = 2147483647)
private String entryName;
@Column(name = "notes", length = 2147483647)
private String notes;
@Column(name = "screen_message", length = 2147483647)
private String screenMessage;
@Column(name = "sort")
private Integer sort;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "entriesId")
private List<Vote> voteList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "entriesId")
private List<CompoEntryFile> compoEntryFileList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "entriesId")
private List<CompoEntryParticipant> compoEntryParticipantList;
@JoinColumn(name = "compos_id", referencedColumnName = "compos_id", nullable = false)
@ManyToOne(optional = false)
private Compo composId;
@JoinColumn(name = "creator", referencedColumnName = "users_id")
@ManyToOne
private User creator;
@Version
@Column(nullable = false)
private int jpaVersionField;
public CompoEntry() {
}
public CompoEntry(Integer entriesId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntry.java
this.entriesId = entriesId;
}
public CompoEntry(Integer entriesId, Date entryCreated, String entryName) {
this.entriesId = entriesId;
this.entryCreated = entryCreated;
this.entryName = entryName;
}
public Integer getEntriesId() {
return entriesId;
}
public void setEntriesId(Integer entriesId) {
this.entriesId = entriesId;
}
=======
this.id = entriesId;
}
public CompoEntry(Integer entriesId, Date entryCreated, String entryName) {
this.id = entriesId;
this.entryCreated = entryCreated;
this.entryName = entryName;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntry.java
public Date getEntryCreated() {
return entryCreated;
}
public void setEntryCreated(Date entryCreated) {
this.entryCreated = entryCreated;
}
public String getEntryName() {
return entryName;
}
public void setEntryName(String entryName) {
this.entryName = entryName;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
public String getScreenMessage() {
return screenMessage;
}
public void setScreenMessage(String screenMessage) {
this.screenMessage = screenMessage;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public List<Vote> getVoteList() {
return voteList;
}
public void setVoteList(List<Vote> voteList) {
this.voteList = voteList;
}
public List<CompoEntryFile> getCompoEntryFileList() {
return compoEntryFileList;
}
public void setCompoEntryFileList(List<CompoEntryFile> compoEntryFileList) {
this.compoEntryFileList = compoEntryFileList;
}
public List<CompoEntryParticipant> getCompoEntryParticipantList() {
return compoEntryParticipantList;
}
public void setCompoEntryParticipantList(
List<CompoEntryParticipant> compoEntryParticipantList) {
this.compoEntryParticipantList = compoEntryParticipantList;
}
public Compo getComposId() {
return composId;
}
public void setComposId(Compo composId) {
this.composId = composId;
}
public User getCreator() {
return creator;
}
public void setCreator(User creator) {
this.creator = creator;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntry.java
int hash = 0;
hash += (entriesId != null ? entriesId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntry.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntry.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof CompoEntry)) {
return false;
}
CompoEntry other = (CompoEntry) object;
if ((this.entriesId == null && other.entriesId != null)
|| (this.entriesId != null && !this.entriesId
.equals(other.entriesId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof CompoEntry)) {
return false;
}
CompoEntry other = (CompoEntry) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntry.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntry.java
return "fi.insomnia.bortal.model.CompoEntry[entriesId=" + entriesId
+ "]";
=======
return "fi.insomnia.bortal.model.CompoEntry[entriesId=" + id + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntry.java
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
*
* @author jkj
*/
@Entity
@Table(name = "entry_files")
@NamedQueries( {
@NamedQuery(name = "CompoEntryFile.findAll", query = "SELECT c FROM CompoEntryFile c"),
@NamedQuery(name = "CompoEntryFile.findByEntryFilesId", query = "SELECT c FROM CompoEntryFile c WHERE c.entryFilesId = :entryFilesId"),
@NamedQuery(name = "CompoEntryFile.findByMimeType", query = "SELECT c FROM CompoEntryFile c WHERE c.mimeType = :mimeType"),
@NamedQuery(name = "CompoEntryFile.findByFileName", query = "SELECT c FROM CompoEntryFile c WHERE c.fileName = :fileName"),
@NamedQuery(name = "CompoEntryFile.findByDescription", query = "SELECT c FROM CompoEntryFile c WHERE c.description = :description"),
@NamedQuery(name = "CompoEntryFile.findByHash", query = "SELECT c FROM CompoEntryFile c WHERE c.hash = :hash"),
@NamedQuery(name = "CompoEntryFile.findByComment", query = "SELECT c FROM CompoEntryFile c WHERE c.comment = :comment"),
@NamedQuery(name = "CompoEntryFile.findByUploaded", query = "SELECT c FROM CompoEntryFile c WHERE c.uploaded = :uploaded") })
public class CompoEntryFile implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "entry_files_id", nullable = false)
private Integer id;
@Column(name = "mime_type", length = 2147483647)
private String mimeType;
@Column(name = "file_name", length = 2147483647)
private String fileName;
@Column(name = "description", length = 2147483647)
private String description;
@Column(name = "hash", length = 2147483647)
private String hash;
@Column(name = "comment", length = 2147483647)
private String comment;
@Lob
@Column(name = "file_data")
private byte[] fileData;
@Column(name = "uploaded", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date uploaded;
@JoinColumn(name = "entries_id", referencedColumnName = "entries_id", nullable = false)
@ManyToOne(optional = false)
private CompoEntry entriesId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public CompoEntryFile() {
}
public CompoEntryFile(Integer entryFilesId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryFile.java
this.entryFilesId = entryFilesId;
}
public CompoEntryFile(Integer entryFilesId, Date uploaded) {
this.entryFilesId = entryFilesId;
this.uploaded = uploaded;
}
public Integer getEntryFilesId() {
return entryFilesId;
}
public void setEntryFilesId(Integer entryFilesId) {
this.entryFilesId = entryFilesId;
}
=======
this.id = entryFilesId;
}
public CompoEntryFile(Integer entryFilesId, Date uploaded) {
this.id = entryFilesId;
this.uploaded = uploaded;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryFile.java
public String getMimeType() {
return mimeType;
}
public void setMimeType(String mimeType) {
this.mimeType = mimeType;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getHash() {
return hash;
}
public void setHash(String hash) {
this.hash = hash;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public byte[] getFileData() {
return fileData;
}
public void setFileData(byte[] fileData) {
this.fileData = fileData;
}
public Date getUploaded() {
return uploaded;
}
public void setUploaded(Date uploaded) {
this.uploaded = uploaded;
}
public CompoEntry getEntriesId() {
return entriesId;
}
public void setEntriesId(CompoEntry entriesId) {
this.entriesId = entriesId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryFile.java
int hash = 0;
hash += (entryFilesId != null ? entryFilesId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryFile.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryFile.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof CompoEntryFile)) {
return false;
}
CompoEntryFile other = (CompoEntryFile) object;
if ((this.entryFilesId == null && other.entryFilesId != null)
|| (this.entryFilesId != null && !this.entryFilesId
.equals(other.entryFilesId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof CompoEntryFile)) {
return false;
}
CompoEntryFile other = (CompoEntryFile) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryFile.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryFile.java
return "fi.insomnia.bortal.model.CompoEntryFile[entryFilesId="
+ entryFilesId + "]";
=======
return "fi.insomnia.bortal.model.CompoEntryFile[entryFilesId=" + id + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryFile.java
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
*
* @author jkj
*/
@Entity
@Table(name = "entry_participations")
@NamedQueries( {
@NamedQuery(name = "CompoEntryParticipant.findAll", query = "SELECT c FROM CompoEntryParticipant c"),
@NamedQuery(name = "CompoEntryParticipant.findByEntryParticipationsId", query = "SELECT c FROM CompoEntryParticipant c WHERE c.entryParticipationsId = :entryParticipationsId"),
@NamedQuery(name = "CompoEntryParticipant.findByRole", query = "SELECT c FROM CompoEntryParticipant c WHERE c.role = :role") })
public class CompoEntryParticipant implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "entry_participations_id", nullable = false)
private Integer id;
@Column(name = "role", length = 2147483647)
private String role;
@JoinColumn(name = "entries_id", referencedColumnName = "entries_id", nullable = false)
@ManyToOne(optional = false)
private CompoEntry entriesId;
@JoinColumn(name = "users_id", referencedColumnName = "users_id", nullable = false)
@ManyToOne(optional = false)
private User usersId;
@Version
@Column(nullable = false)
private int jpaVersionField;
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryParticipant.java
public CompoEntryParticipant(Integer entryParticipationsId) {
this.entryParticipationsId = entryParticipationsId;
}
public Integer getEntryParticipationsId() {
return entryParticipationsId;
}
public void setEntryParticipationsId(Integer entryParticipationsId) {
this.entryParticipationsId = entryParticipationsId;
=======
public CompoEntryParticipant() {
}
public CompoEntryParticipant(Integer entryParticipationsId) {
this.id = entryParticipationsId;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryParticipant.java
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public CompoEntry getEntriesId() {
return entriesId;
}
public void setEntriesId(CompoEntry entriesId) {
this.entriesId = entriesId;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryParticipant.java
int hash = 0;
hash += (entryParticipationsId != null ? entryParticipationsId
.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryParticipant.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryParticipant.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof CompoEntryParticipant)) {
return false;
}
CompoEntryParticipant other = (CompoEntryParticipant) object;
if ((this.entryParticipationsId == null && other.entryParticipationsId != null)
|| (this.entryParticipationsId != null && !this.entryParticipationsId
.equals(other.entryParticipationsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof CompoEntryParticipant)) {
return false;
}
CompoEntryParticipant other = (CompoEntryParticipant) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryParticipant.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryParticipant.java
return "fi.insomnia.bortal.model.CompoEntryParticipant[entryParticipationsId="
+ entryParticipationsId + "]";
=======
return "fi.insomnia.bortal.model.CompoEntryParticipant[entryParticipationsId=" + id + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryParticipant.java
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
/**
*
* @author jkj
*/
@Entity
@Table(name = "discounts")
@NamedQueries( {
@NamedQuery(name = "Discount.findAll", query = "SELECT d FROM Discount d"),
@NamedQuery(name = "Discount.findByDiscountsId", query = "SELECT d FROM Discount d WHERE d.discountsId = :discountsId"),
@NamedQuery(name = "Discount.findByPercentage", query = "SELECT d FROM Discount d WHERE d.percentage = :percentage"),
@NamedQuery(name = "Discount.findByCode", query = "SELECT d FROM Discount d WHERE d.code = :code"),
@NamedQuery(name = "Discount.findByDetails", query = "SELECT d FROM Discount d WHERE d.details = :details"),
@NamedQuery(name = "Discount.findByAmountMin", query = "SELECT d FROM Discount d WHERE d.amountMin = :amountMin"),
@NamedQuery(name = "Discount.findByAmountMax", query = "SELECT d FROM Discount d WHERE d.amountMax = :amountMax"),
@NamedQuery(name = "Discount.findByActive", query = "SELECT d FROM Discount d WHERE d.active = :active"),
@NamedQuery(name = "Discount.findByMaxNum", query = "SELECT d FROM Discount d WHERE d.maxNum = :maxNum"),
@NamedQuery(name = "Discount.findByPerUser", query = "SELECT d FROM Discount d WHERE d.perUser = :perUser") })
public class Discount implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "discounts_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Discount.java
private Integer discountsId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Discount.java
@Column(name = "percentage", nullable = false)
private BigInteger percentage;
@Column(name = "code", length = 2147483647)
private String code;
@Column(name = "details", length = 2147483647)
private String details;
@Column(name = "amount_min", nullable = false)
private int amountMin;
@Column(name = "amount_max", nullable = false)
private int amountMax;
@Column(name = "active", nullable = false)
private boolean active;
@Column(name = "max_num", nullable = false)
private int maxNum;
@Column(name = "per_user", nullable = false)
private int perUser;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "discountsId")
private List<DiscountInstance> discountInstanceList;
@Version
@Column(nullable = false)
private int jpaVersionField;
public Discount() {
}
public Discount(Integer discountsId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Discount.java
this.discountsId = discountsId;
}
public Discount(Integer discountsId, BigInteger percentage, int amountMin,
int amountMax, boolean active, int maxNum, int perUser) {
this.discountsId = discountsId;
this.percentage = percentage;
this.amountMin = amountMin;
this.amountMax = amountMax;
this.active = active;
this.maxNum = maxNum;
this.perUser = perUser;
}
public Integer getDiscountsId() {
return discountsId;
}
public void setDiscountsId(Integer discountsId) {
this.discountsId = discountsId;
}
=======
this.id = discountsId;
}
public Discount(Integer discountsId, BigInteger percentage, int amountMin, int amountMax, boolean active, int maxNum, int perUser) {
this.id = discountsId;
this.percentage = percentage;
this.amountMin = amountMin;
this.amountMax = amountMax;
this.active = active;
this.maxNum = maxNum;
this.perUser = perUser;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Discount.java
public BigInteger getPercentage() {
return percentage;
}
public void setPercentage(BigInteger percentage) {
this.percentage = percentage;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getDetails() {
return details;
}
public void setDetails(String details) {
this.details = details;
}
public int getAmountMin() {
return amountMin;
}
public void setAmountMin(int amountMin) {
this.amountMin = amountMin;
}
public int getAmountMax() {
return amountMax;
}
public void setAmountMax(int amountMax) {
this.amountMax = amountMax;
}
public boolean getActive() {
return active;
}
public void setActive(boolean active) {
this.active = active;
}
public int getMaxNum() {
return maxNum;
}
public void setMaxNum(int maxNum) {
this.maxNum = maxNum;
}
public int getPerUser() {
return perUser;
}
public void setPerUser(int perUser) {
this.perUser = perUser;
}
public List<DiscountInstance> getDiscountInstanceList() {
return discountInstanceList;
}
public void setDiscountInstanceList(
List<DiscountInstance> discountInstanceList) {
this.discountInstanceList = discountInstanceList;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Discount.java
int hash = 0;
hash += (discountsId != null ? discountsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Discount.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Discount.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Discount)) {
return false;
}
Discount other = (Discount) object;
if ((this.discountsId == null && other.discountsId != null)
|| (this.discountsId != null && !this.discountsId
.equals(other.discountsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Discount)) {
return false;
}
Discount other = (Discount) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Discount.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Discount.java
return "fi.insomnia.bortal.model.Discount[discountsId=" + discountsId
+ "]";
=======
return "fi.insomnia.bortal.model.Discount[discountsId=" + id + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Discount.java
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/DiscountInstance.java
import java.io.Serializable;
=======
import javax.persistence.Basic;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/DiscountInstance.java
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "discount_instances")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/DiscountInstance.java
@NamedQueries( {
@NamedQuery(name = "DiscountInstance.findAll", query = "SELECT d FROM DiscountInstance d"),
@NamedQuery(name = "DiscountInstance.findByDiscountsInstancesId", query = "SELECT d FROM DiscountInstance d WHERE d.discountsInstancesId = :discountsInstancesId") })
public class DiscountInstance implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "DiscountInstance.findAll", query = "SELECT d FROM DiscountInstance d"),
@NamedQuery(name = "DiscountInstance.findByDiscountsInstancesId", query = "SELECT d FROM DiscountInstance d WHERE d.discountsInstancesId = :discountsInstancesId")})
public class DiscountInstance implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/DiscountInstance.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "discounts_instances_id", nullable = false)
private Integer id;
@JoinColumn(name = "account_events_id", referencedColumnName = "account_events_id")
@ManyToOne
private AccountEvent accountEventsId;
@JoinColumn(name = "discounts_id", referencedColumnName = "discounts_id", nullable = false)
@ManyToOne(optional = false)
private Discount discountsId;
@JoinColumn(name = "users_id", referencedColumnName = "users_id", nullable = false)
@ManyToOne(optional = false)
private User usersId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public DiscountInstance() {
}
public DiscountInstance(Integer discountsInstancesId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/DiscountInstance.java
this.discountsInstancesId = discountsInstancesId;
}
public Integer getDiscountsInstancesId() {
return discountsInstancesId;
}
public void setDiscountsInstancesId(Integer discountsInstancesId) {
this.discountsInstancesId = discountsInstancesId;
=======
this.id = discountsInstancesId;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/DiscountInstance.java
}
public AccountEvent getAccountEventsId() {
return accountEventsId;
}
public void setAccountEventsId(AccountEvent accountEventsId) {
this.accountEventsId = accountEventsId;
}
public Discount getDiscountsId() {
return discountsId;
}
public void setDiscountsId(Discount discountsId) {
this.discountsId = discountsId;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/DiscountInstance.java
int hash = 0;
hash += (discountsInstancesId != null ? discountsInstancesId.hashCode()
: 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/DiscountInstance.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/DiscountInstance.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof DiscountInstance)) {
return false;
}
DiscountInstance other = (DiscountInstance) object;
if ((this.discountsInstancesId == null && other.discountsInstancesId != null)
|| (this.discountsInstancesId != null && !this.discountsInstancesId
.equals(other.discountsInstancesId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof DiscountInstance)) {
return false;
}
DiscountInstance other = (DiscountInstance) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/DiscountInstance.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/DiscountInstance.java
return "fi.insomnia.bortal.model.DiscountInstance[discountsInstancesId="
+ discountsInstancesId + "]";
=======
return "fi.insomnia.bortal.model.DiscountInstance[discountsInstancesId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/DiscountInstance.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "events")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Event.java
@NamedQueries( {
@NamedQuery(name = "Event.findAll", query = "SELECT e FROM Event e"),
@NamedQuery(name = "Event.findByEventsId", query = "SELECT e FROM Event e WHERE e.eventsId = :eventsId"),
@NamedQuery(name = "Event.findByStartTime", query = "SELECT e FROM Event e WHERE e.startTime = :startTime"),
@NamedQuery(name = "Event.findByEndTime", query = "SELECT e FROM Event e WHERE e.endTime = :endTime"),
@NamedQuery(name = "Event.findByName", query = "SELECT e FROM Event e WHERE e.name = :name"),
@NamedQuery(name = "Event.findByReferer", query = "SELECT e FROM Event e WHERE e.referer = :referer") })
public class Event implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "Event.findAll", query = "SELECT e FROM Event e"),
@NamedQuery(name = "Event.findByEventsId", query = "SELECT e FROM Event e WHERE e.eventsId = :eventsId"),
@NamedQuery(name = "Event.findByStartTime", query = "SELECT e FROM Event e WHERE e.startTime = :startTime"),
@NamedQuery(name = "Event.findByEndTime", query = "SELECT e FROM Event e WHERE e.endTime = :endTime"),
@NamedQuery(name = "Event.findByName", query = "SELECT e FROM Event e WHERE e.name = :name"),
@NamedQuery(name = "Event.findByReferer", query = "SELECT e FROM Event e WHERE e.referer = :referer")})
public class Event implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Event.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "events_id", nullable = false)
private Integer id;
@Column(name = "start_time")
@Temporal(TemporalType.TIMESTAMP)
private Date startTime;
@Column(name = "end_time")
@Temporal(TemporalType.TIMESTAMP)
private Date endTime;
@Column(name = "name", nullable = false, length = 2147483647)
private String name;
@Column(name = "referer", length = 2147483647)
private String referer;
@JoinColumn(name = "event_settings_id", referencedColumnName = "event_settings_id", nullable = false)
@ManyToOne(optional = false)
private EventSettings eventSettingsId;
@JoinColumn(name = "event_status_id", referencedColumnName = "event_status_id", nullable = false)
@ManyToOne(optional = false)
private EventStatus eventStatusId;
@JoinColumn(name = "default_role", referencedColumnName = "roles_id")
@ManyToOne
private Role defaultRole;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "eventsId")
private List<Compo> compoList;
@OneToMany(mappedBy = "eventsId")
private List<CardTemplate> cardTemplateList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "eventsId")
private List<EventMap> eventMapList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "eventsId")
private List<Role> roleList;
@Version
@Column(nullable = false)
private int jpaVersionField;
public Event() {
}
public Event(Integer eventsId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Event.java
this.eventsId = eventsId;
}
public Event(Integer eventsId, String name) {
this.eventsId = eventsId;
this.name = name;
}
public Integer getEventsId() {
return eventsId;
}
public void setEventsId(Integer eventsId) {
this.eventsId = eventsId;
}
=======
this.id = eventsId;
}
public Event(Integer eventsId, String name) {
this.id = eventsId;
this.name = name;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Event.java
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getReferer() {
return referer;
}
public void setReferer(String referer) {
this.referer = referer;
}
public EventSettings getEventSettingsId() {
return eventSettingsId;
}
public void setEventSettingsId(EventSettings eventSettingsId) {
this.eventSettingsId = eventSettingsId;
}
public EventStatus getEventStatusId() {
return eventStatusId;
}
public void setEventStatusId(EventStatus eventStatusId) {
this.eventStatusId = eventStatusId;
}
public Role getDefaultRole() {
return defaultRole;
}
public void setDefaultRole(Role defaultRole) {
this.defaultRole = defaultRole;
}
public List<Compo> getCompoList() {
return compoList;
}
public void setCompoList(List<Compo> compoList) {
this.compoList = compoList;
}
public List<CardTemplate> getCardTemplateList() {
return cardTemplateList;
}
public void setCardTemplateList(List<CardTemplate> cardTemplateList) {
this.cardTemplateList = cardTemplateList;
}
public List<EventMap> getEventMapList() {
return eventMapList;
}
public void setEventMapList(List<EventMap> eventMapList) {
this.eventMapList = eventMapList;
}
public List<Role> getRoleList() {
return roleList;
}
public void setRoleList(List<Role> roleList) {
this.roleList = roleList;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Event.java
int hash = 0;
hash += (eventsId != null ? eventsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Event.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Event.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Event)) {
return false;
}
Event other = (Event) object;
if ((this.eventsId == null && other.eventsId != null)
|| (this.eventsId != null && !this.eventsId
.equals(other.eventsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Event)) {
return false;
}
Event other = (Event) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Event.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Event.java
return "fi.insomnia.bortal.model.Event[eventsId=" + eventsId + "]";
=======
return "fi.insomnia.bortal.model.Event[eventsId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Event.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "maps")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventMap.java
@NamedQueries( {
@NamedQuery(name = "EventMap.findAll", query = "SELECT e FROM EventMap e"),
@NamedQuery(name = "EventMap.findByMapsId", query = "SELECT e FROM EventMap e WHERE e.mapsId = :mapsId"),
@NamedQuery(name = "EventMap.findByMapName", query = "SELECT e FROM EventMap e WHERE e.mapName = :mapName") })
public class EventMap implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "EventMap.findAll", query = "SELECT e FROM EventMap e"),
@NamedQuery(name = "EventMap.findByMapsId", query = "SELECT e FROM EventMap e WHERE e.mapsId = :mapsId"),
@NamedQuery(name = "EventMap.findByMapName", query = "SELECT e FROM EventMap e WHERE e.mapName = :mapName")})
public class EventMap implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventMap.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "maps_id", nullable = false)
private Integer id;
@Lob
@Column(name = "map_data")
private byte[] mapData;
@Column(name = "map_name", length = 2147483647)
private String mapName;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "mapsId")
private List<Place> placeList;
@JoinColumn(name = "events_id", referencedColumnName = "events_id", nullable = false)
@ManyToOne(optional = false)
private Event eventsId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public EventMap() {
}
public EventMap(Integer mapsId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventMap.java
this.mapsId = mapsId;
}
public Integer getMapsId() {
return mapsId;
}
public void setMapsId(Integer mapsId) {
this.mapsId = mapsId;
=======
this.id = mapsId;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventMap.java
}
public byte[] getMapData() {
return mapData;
}
public void setMapData(byte[] mapData) {
this.mapData = mapData;
}
public String getMapName() {
return mapName;
}
public void setMapName(String mapName) {
this.mapName = mapName;
}
public List<Place> getPlaceList() {
return placeList;
}
public void setPlaceList(List<Place> placeList) {
this.placeList = placeList;
}
public Event getEventsId() {
return eventsId;
}
public void setEventsId(Event eventsId) {
this.eventsId = eventsId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventMap.java
int hash = 0;
hash += (mapsId != null ? mapsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventMap.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventMap.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof EventMap)) {
return false;
}
EventMap other = (EventMap) object;
if ((this.mapsId == null && other.mapsId != null)
|| (this.mapsId != null && !this.mapsId.equals(other.mapsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof EventMap)) {
return false;
}
EventMap other = (EventMap) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventMap.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventMap.java
return "fi.insomnia.bortal.model.EventMap[mapsId=" + mapsId + "]";
=======
return "fi.insomnia.bortal.model.EventMap[mapsId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventMap.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "event_settings")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventSettings.java
@NamedQueries( {
@NamedQuery(name = "EventSettings.findAll", query = "SELECT e FROM EventSettings e"),
@NamedQuery(name = "EventSettings.findByEventSettingsId", query = "SELECT e FROM EventSettings e WHERE e.eventSettingsId = :eventSettingsId"),
@NamedQuery(name = "EventSettings.findByResourceBundle", query = "SELECT e FROM EventSettings e WHERE e.resourceBundle = :resourceBundle"),
@NamedQuery(name = "EventSettings.findByStyleSheet", query = "SELECT e FROM EventSettings e WHERE e.styleSheet = :styleSheet"),
@NamedQuery(name = "EventSettings.findByNameGeneralForm", query = "SELECT e FROM EventSettings e WHERE e.nameGeneralForm = :nameGeneralForm"),
@NamedQuery(name = "EventSettings.findByNamePossissiveForm", query = "SELECT e FROM EventSettings e WHERE e.namePossissiveForm = :namePossissiveForm") })
public class EventSettings implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "EventSettings.findAll", query = "SELECT e FROM EventSettings e"),
@NamedQuery(name = "EventSettings.findByEventSettingsId", query = "SELECT e FROM EventSettings e WHERE e.eventSettingsId = :eventSettingsId"),
@NamedQuery(name = "EventSettings.findByResourceBundle", query = "SELECT e FROM EventSettings e WHERE e.resourceBundle = :resourceBundle"),
@NamedQuery(name = "EventSettings.findByStyleSheet", query = "SELECT e FROM EventSettings e WHERE e.styleSheet = :styleSheet"),
@NamedQuery(name = "EventSettings.findByNameGeneralForm", query = "SELECT e FROM EventSettings e WHERE e.nameGeneralForm = :nameGeneralForm"),
@NamedQuery(name = "EventSettings.findByNamePossissiveForm", query = "SELECT e FROM EventSettings e WHERE e.namePossissiveForm = :namePossissiveForm")})
public class EventSettings implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventSettings.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "event_settings_id", nullable = false)
private Integer id;
@Column(name = "resource_bundle", length = 2147483647)
private String resourceBundle;
@Column(name = "style_sheet", length = 2147483647)
private String styleSheet;
@Column(name = "name_general_form", length = 2147483647)
private String nameGeneralForm;
@Column(name = "name_possissive_form", length = 2147483647)
private String namePossissiveForm;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "eventSettingsId")
private List<Event> eventList;
@Version
@Column(nullable = false)
private int jpaVersionField;
public EventSettings() {
}
public EventSettings(Integer eventSettingsId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventSettings.java
this.eventSettingsId = eventSettingsId;
}
public Integer getEventSettingsId() {
return eventSettingsId;
}
public void setEventSettingsId(Integer eventSettingsId) {
this.eventSettingsId = eventSettingsId;
=======
this.id = eventSettingsId;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventSettings.java
}
public String getResourceBundle() {
return resourceBundle;
}
public void setResourceBundle(String resourceBundle) {
this.resourceBundle = resourceBundle;
}
public String getStyleSheet() {
return styleSheet;
}
public void setStyleSheet(String styleSheet) {
this.styleSheet = styleSheet;
}
public String getNameGeneralForm() {
return nameGeneralForm;
}
public void setNameGeneralForm(String nameGeneralForm) {
this.nameGeneralForm = nameGeneralForm;
}
public String getNamePossissiveForm() {
return namePossissiveForm;
}
public void setNamePossissiveForm(String namePossissiveForm) {
this.namePossissiveForm = namePossissiveForm;
}
public List<Event> getEventList() {
return eventList;
}
public void setEventList(List<Event> eventList) {
this.eventList = eventList;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventSettings.java
int hash = 0;
hash += (eventSettingsId != null ? eventSettingsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventSettings.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventSettings.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof EventSettings)) {
return false;
}
EventSettings other = (EventSettings) object;
if ((this.eventSettingsId == null && other.eventSettingsId != null)
|| (this.eventSettingsId != null && !this.eventSettingsId
.equals(other.eventSettingsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof EventSettings)) {
return false;
}
EventSettings other = (EventSettings) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventSettings.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventSettings.java
return "fi.insomnia.bortal.model.EventSettings[eventSettingsId="
+ eventSettingsId + "]";
=======
return "fi.insomnia.bortal.model.EventSettings[eventSettingsId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventSettings.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventStatus.java
@Table(name = "event_status", uniqueConstraints = { @UniqueConstraint(columnNames = { "status_name" }) })
@NamedQueries( {
@NamedQuery(name = "EventStatus.findAll", query = "SELECT e FROM EventStatus e"),
@NamedQuery(name = "EventStatus.findByEventStatusId", query = "SELECT e FROM EventStatus e WHERE e.eventStatusId = :eventStatusId"),
@NamedQuery(name = "EventStatus.findByStatusName", query = "SELECT e FROM EventStatus e WHERE e.statusName = :statusName") })
public class EventStatus implements Serializable {
=======
@Table(name = "event_status", uniqueConstraints = {
@UniqueConstraint(columnNames = {"status_name"})})
@NamedQueries({
@NamedQuery(name = "EventStatus.findAll", query = "SELECT e FROM EventStatus e"),
@NamedQuery(name = "EventStatus.findByEventStatusId", query = "SELECT e FROM EventStatus e WHERE e.eventStatusId = :eventStatusId"),
@NamedQuery(name = "EventStatus.findByStatusName", query = "SELECT e FROM EventStatus e WHERE e.statusName = :statusName")})
public class EventStatus implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventStatus.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "event_status_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventStatus.java
private Integer eventStatusId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventStatus.java
@Column(name = "status_name", nullable = false, length = 2147483647)
private String statusName;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "eventStatusId")
private List<Event> eventList;
@Version
@Column(nullable = false)
private int jpaVersionField;
public EventStatus() {
}
public EventStatus(Integer eventStatusId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventStatus.java
this.eventStatusId = eventStatusId;
}
public EventStatus(Integer eventStatusId, String statusName) {
this.eventStatusId = eventStatusId;
this.statusName = statusName;
}
public Integer getEventStatusId() {
return eventStatusId;
}
public void setEventStatusId(Integer eventStatusId) {
this.eventStatusId = eventStatusId;
}
=======
this.id = eventStatusId;
}
public EventStatus(Integer eventStatusId, String statusName) {
this.id = eventStatusId;
this.statusName = statusName;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventStatus.java
public String getStatusName() {
return statusName;
}
public void setStatusName(String statusName) {
this.statusName = statusName;
}
public List<Event> getEventList() {
return eventList;
}
public void setEventList(List<Event> eventList) {
this.eventList = eventList;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventStatus.java
int hash = 0;
hash += (eventStatusId != null ? eventStatusId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventStatus.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventStatus.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof EventStatus)) {
return false;
}
EventStatus other = (EventStatus) object;
if ((this.eventStatusId == null && other.eventStatusId != null)
|| (this.eventStatusId != null && !this.eventStatusId
.equals(other.eventStatusId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof EventStatus)) {
return false;
}
EventStatus other = (EventStatus) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventStatus.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventStatus.java
return "fi.insomnia.bortal.model.EventStatus[eventStatusId="
+ eventStatusId + "]";
=======
return "fi.insomnia.bortal.model.EventStatus[eventStatusId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventStatus.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "food_waves")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
@NamedQueries( {
@NamedQuery(name = "FoodWave.findAll", query = "SELECT f FROM FoodWave f"),
@NamedQuery(name = "FoodWave.findByFoodWavesId", query = "SELECT f FROM FoodWave f WHERE f.foodWavesId = :foodWavesId"),
@NamedQuery(name = "FoodWave.findByWaveName", query = "SELECT f FROM FoodWave f WHERE f.waveName = :waveName"),
@NamedQuery(name = "FoodWave.findByWaveDescription", query = "SELECT f FROM FoodWave f WHERE f.waveDescription = :waveDescription"),
@NamedQuery(name = "FoodWave.findByWaveTime", query = "SELECT f FROM FoodWave f WHERE f.waveTime = :waveTime"),
@NamedQuery(name = "FoodWave.findByWaveClosed", query = "SELECT f FROM FoodWave f WHERE f.waveClosed = :waveClosed") })
public class FoodWave implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "FoodWave.findAll", query = "SELECT f FROM FoodWave f"),
@NamedQuery(name = "FoodWave.findByFoodWavesId", query = "SELECT f FROM FoodWave f WHERE f.foodWavesId = :foodWavesId"),
@NamedQuery(name = "FoodWave.findByWaveName", query = "SELECT f FROM FoodWave f WHERE f.waveName = :waveName"),
@NamedQuery(name = "FoodWave.findByWaveDescription", query = "SELECT f FROM FoodWave f WHERE f.waveDescription = :waveDescription"),
@NamedQuery(name = "FoodWave.findByWaveTime", query = "SELECT f FROM FoodWave f WHERE f.waveTime = :waveTime"),
@NamedQuery(name = "FoodWave.findByWaveClosed", query = "SELECT f FROM FoodWave f WHERE f.waveClosed = :waveClosed")})
public class FoodWave implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "food_waves_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
private Integer foodWavesId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
@Column(name = "wave_name", nullable = false, length = 2147483647)
private String waveName;
@Column(name = "wave_description", length = 2147483647)
private String waveDescription;
@Column(name = "wave_time")
@Temporal(TemporalType.TIMESTAMP)
private Date waveTime;
@Column(name = "wave_closed", nullable = false)
private boolean waveClosed;
@OneToMany(mappedBy = "foodWavesId")
private List<AccountEvent> accountEventList;
@Version
@Column(nullable = false)
private int jpaVersionField;
public FoodWave() {
}
public FoodWave(Integer foodWavesId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
this.foodWavesId = foodWavesId;
}
public FoodWave(Integer foodWavesId, String waveName, boolean waveClosed) {
this.foodWavesId = foodWavesId;
this.waveName = waveName;
this.waveClosed = waveClosed;
}
public Integer getFoodWavesId() {
return foodWavesId;
}
public void setFoodWavesId(Integer foodWavesId) {
this.foodWavesId = foodWavesId;
}
=======
this.id = foodWavesId;
}
public FoodWave(Integer foodWavesId, String waveName, boolean waveClosed) {
this.id = foodWavesId;
this.waveName = waveName;
this.waveClosed = waveClosed;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
public String getWaveName() {
return waveName;
}
public void setWaveName(String waveName) {
this.waveName = waveName;
}
public String getWaveDescription() {
return waveDescription;
}
public void setWaveDescription(String waveDescription) {
this.waveDescription = waveDescription;
}
public Date getWaveTime() {
return waveTime;
}
public void setWaveTime(Date waveTime) {
this.waveTime = waveTime;
}
public boolean getWaveClosed() {
return waveClosed;
}
public void setWaveClosed(boolean waveClosed) {
this.waveClosed = waveClosed;
}
public List<AccountEvent> getAccountEventList() {
return accountEventList;
}
public void setAccountEventList(List<AccountEvent> accountEventList) {
this.accountEventList = accountEventList;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
int hash = 0;
hash += (foodWavesId != null ? foodWavesId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof FoodWave)) {
return false;
}
FoodWave other = (FoodWave) object;
if ((this.foodWavesId == null && other.foodWavesId != null)
|| (this.foodWavesId != null && !this.foodWavesId
.equals(other.foodWavesId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof FoodWave)) {
return false;
}
FoodWave other = (FoodWave) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
return "fi.insomnia.bortal.model.FoodWave[foodWavesId=" + foodWavesId
+ "]";
=======
return "fi.insomnia.bortal.model.FoodWave[foodWavesId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "food_wave_templates")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
@NamedQueries( {
@NamedQuery(name = "FoodWaveTemplate.findAll", query = "SELECT f FROM FoodWaveTemplate f"),
@NamedQuery(name = "FoodWaveTemplate.findByFoodWaveTemplatesId", query = "SELECT f FROM FoodWaveTemplate f WHERE f.foodWaveTemplatesId = :foodWaveTemplatesId"),
@NamedQuery(name = "FoodWaveTemplate.findByTemplateName", query = "SELECT f FROM FoodWaveTemplate f WHERE f.templateName = :templateName"),
@NamedQuery(name = "FoodWaveTemplate.findByTemplateDescription", query = "SELECT f FROM FoodWaveTemplate f WHERE f.templateDescription = :templateDescription") })
public class FoodWaveTemplate implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "FoodWaveTemplate.findAll", query = "SELECT f FROM FoodWaveTemplate f"),
@NamedQuery(name = "FoodWaveTemplate.findByFoodWaveTemplatesId", query = "SELECT f FROM FoodWaveTemplate f WHERE f.foodWaveTemplatesId = :foodWaveTemplatesId"),
@NamedQuery(name = "FoodWaveTemplate.findByTemplateName", query = "SELECT f FROM FoodWaveTemplate f WHERE f.templateName = :templateName"),
@NamedQuery(name = "FoodWaveTemplate.findByTemplateDescription", query = "SELECT f FROM FoodWaveTemplate f WHERE f.templateDescription = :templateDescription")})
public class FoodWaveTemplate implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "food_wave_templates_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
private Integer foodWaveTemplatesId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
@Column(name = "template_name", nullable = false, length = 2147483647)
private String templateName;
@Column(name = "template_description", length = 2147483647)
private String templateDescription;
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
=======
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
@ManyToMany(mappedBy = "foodWaveTemplate")
private List<Product> products;
@Version
@Column(nullable = false)
private int jpaVersionField;
public FoodWaveTemplate() {
}
public FoodWaveTemplate(Integer foodWaveTemplatesId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
this.foodWaveTemplatesId = foodWaveTemplatesId;
}
public FoodWaveTemplate(Integer foodWaveTemplatesId, String templateName) {
this.foodWaveTemplatesId = foodWaveTemplatesId;
this.templateName = templateName;
}
public Integer getFoodWaveTemplatesId() {
return foodWaveTemplatesId;
}
public void setFoodWaveTemplatesId(Integer foodWaveTemplatesId) {
this.foodWaveTemplatesId = foodWaveTemplatesId;
}
=======
this.id = foodWaveTemplatesId;
}
public FoodWaveTemplate(Integer foodWaveTemplatesId, String templateName) {
this.id = foodWaveTemplatesId;
this.templateName = templateName;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
public String getTemplateName() {
return templateName;
}
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
public String getTemplateDescription() {
return templateDescription;
}
public void setTemplateDescription(String templateDescription) {
this.templateDescription = templateDescription;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
int hash = 0;
hash += (foodWaveTemplatesId != null ? foodWaveTemplatesId.hashCode()
: 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof FoodWaveTemplate)) {
return false;
}
FoodWaveTemplate other = (FoodWaveTemplate) object;
if ((this.foodWaveTemplatesId == null && other.foodWaveTemplatesId != null)
|| (this.foodWaveTemplatesId != null && !this.foodWaveTemplatesId
.equals(other.foodWaveTemplatesId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof FoodWaveTemplate)) {
return false;
}
FoodWaveTemplate other = (FoodWaveTemplate) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
return "fi.insomnia.bortal.model.FoodWaveTemplate[foodWaveTemplatesId="
+ foodWaveTemplatesId + "]";
=======
return "fi.insomnia.bortal.model.FoodWaveTemplate[foodWaveTemplatesId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
}
/**
* @return the products
*/
public List<Product> getProducts() {
return products;
}
/**
* @param products
* the products to set
*/
public void setProducts(List<Product> products) {
this.products = products;
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/GroupMembership.java
@Table(name = "group_memberships", uniqueConstraints = { @UniqueConstraint(columnNames = {
"users_id", "groups_id" }) })
@NamedQueries( {
@NamedQuery(name = "GroupMembership.findAll", query = "SELECT g FROM GroupMembership g"),
@NamedQuery(name = "GroupMembership.findByGroupMembershipsId", query = "SELECT g FROM GroupMembership g WHERE g.groupMembershipsId = :groupMembershipsId"),
@NamedQuery(name = "GroupMembership.findByInviteAccepted", query = "SELECT g FROM GroupMembership g WHERE g.inviteAccepted = :inviteAccepted"),
@NamedQuery(name = "GroupMembership.findByInviteEmail", query = "SELECT g FROM GroupMembership g WHERE g.inviteEmail = :inviteEmail"),
@NamedQuery(name = "GroupMembership.findByInviteName", query = "SELECT g FROM GroupMembership g WHERE g.inviteName = :inviteName") })
public class GroupMembership implements Serializable {
=======
@Table(name = "group_memberships", uniqueConstraints = {
@UniqueConstraint(columnNames = {"users_id", "groups_id"})})
@NamedQueries({
@NamedQuery(name = "GroupMembership.findAll", query = "SELECT g FROM GroupMembership g"),
@NamedQuery(name = "GroupMembership.findByGroupMembershipsId", query = "SELECT g FROM GroupMembership g WHERE g.groupMembershipsId = :groupMembershipsId"),
@NamedQuery(name = "GroupMembership.findByInviteAccepted", query = "SELECT g FROM GroupMembership g WHERE g.inviteAccepted = :inviteAccepted"),
@NamedQuery(name = "GroupMembership.findByInviteEmail", query = "SELECT g FROM GroupMembership g WHERE g.inviteEmail = :inviteEmail"),
@NamedQuery(name = "GroupMembership.findByInviteName", query = "SELECT g FROM GroupMembership g WHERE g.inviteName = :inviteName")})
public class GroupMembership implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/GroupMembership.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "group_memberships_id", nullable = false)
private Integer id;
@Column(name = "invite_accepted")
@Temporal(TemporalType.TIMESTAMP)
private Date inviteAccepted;
@Column(name = "invite_email", length = 2147483647)
private String inviteEmail;
@Column(name = "invite_name", length = 2147483647)
private String inviteName;
@JoinColumn(name = "groups_id", referencedColumnName = "groups_id", nullable = false)
@ManyToOne(optional = false)
private PlaceGroup groupsId;
@JoinColumn(name = "place_reservation", referencedColumnName = "places_id", nullable = false)
@ManyToOne(optional = false)
private Place placeReservation;
@JoinColumn(name = "users_id", referencedColumnName = "users_id")
@ManyToOne
private User usersId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public GroupMembership() {
}
public GroupMembership(Integer groupMembershipsId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/GroupMembership.java
this.groupMembershipsId = groupMembershipsId;
}
public Integer getGroupMembershipsId() {
return groupMembershipsId;
}
public void setGroupMembershipsId(Integer groupMembershipsId) {
this.groupMembershipsId = groupMembershipsId;
=======
this.id = groupMembershipsId;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/GroupMembership.java
}
public Date getInviteAccepted() {
return inviteAccepted;
}
public void setInviteAccepted(Date inviteAccepted) {
this.inviteAccepted = inviteAccepted;
}
public String getInviteEmail() {
return inviteEmail;
}
public void setInviteEmail(String inviteEmail) {
this.inviteEmail = inviteEmail;
}
public String getInviteName() {
return inviteName;
}
public void setInviteName(String inviteName) {
this.inviteName = inviteName;
}
public PlaceGroup getGroupsId() {
return groupsId;
}
public void setGroupsId(PlaceGroup groupsId) {
this.groupsId = groupsId;
}
public Place getPlaceReservation() {
return placeReservation;
}
public void setPlaceReservation(Place placeReservation) {
this.placeReservation = placeReservation;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/GroupMembership.java
int hash = 0;
hash += (groupMembershipsId != null ? groupMembershipsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/GroupMembership.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/GroupMembership.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof GroupMembership)) {
return false;
}
GroupMembership other = (GroupMembership) object;
if ((this.groupMembershipsId == null && other.groupMembershipsId != null)
|| (this.groupMembershipsId != null && !this.groupMembershipsId
.equals(other.groupMembershipsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof GroupMembership)) {
return false;
}
GroupMembership other = (GroupMembership) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/GroupMembership.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/GroupMembership.java
return "fi.insomnia.bortal.model.GroupMembership[groupMembershipsId="
+ groupMembershipsId + "]";
=======
return "fi.insomnia.bortal.model.GroupMembership[groupMembershipsId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/GroupMembership.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
...@@ -17,14 +17,13 @@ import javax.persistence.Version; ...@@ -17,14 +17,13 @@ import javax.persistence.Version;
/** /**
* *
* @author jkj
*/ */
@Entity @Entity
@Table(name = "locations") @Table(name = "locations")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "Location.findAll", query = "SELECT l FROM Location l"), @NamedQuery(name = "Location.findAll", query = "SELECT l FROM Location l"),
@NamedQuery(name = "Location.findByLocationsId", query = "SELECT l FROM Location l WHERE l.locationsId = :locationsId"), @NamedQuery(name = "Location.findById", query = "SELECT l FROM Location l WHERE l.id = :id"),
@NamedQuery(name = "Location.findByLocationName", query = "SELECT l FROM Location l WHERE l.locationName = :locationName") }) @NamedQuery(name = "Location.findByLocationName", query = "SELECT l FROM Location l WHERE l.locationName = :name") })
public class Location implements ModelInterface { public class Location implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -33,11 +32,14 @@ public class Location implements ModelInterface { ...@@ -33,11 +32,14 @@ public class Location implements ModelInterface {
private Integer id; private Integer id;
@Column(name = "location_name", nullable = false) @Column(name = "location_name", nullable = false)
private String locationName; private String name;
@OneToMany(mappedBy = "locationsId")
private List<Reader> readerList; @OneToMany(mappedBy = "id")
private List<Reader> readers;
@OneToMany(mappedBy = "currentLocation") @OneToMany(mappedBy = "currentLocation")
private List<PrintedCard> printedCardList; private List<PrintedCard> printedCardsAtLocation;
@Version @Version
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
...@@ -51,31 +53,31 @@ public class Location implements ModelInterface { ...@@ -51,31 +53,31 @@ public class Location implements ModelInterface {
public Location(Integer locationsId, String locationName) { public Location(Integer locationsId, String locationName) {
this.id = locationsId; this.id = locationsId;
this.locationName = locationName; this.name = locationName;
} }
public String getLocationName() { public String getName() {
return locationName; return name;
} }
public void setLocationName(String locationName) { public void setName(String locationName) {
this.locationName = locationName; this.name = locationName;
} }
public List<Reader> getReaderList() { public List<Reader> getReaders() {
return readerList; return readers;
} }
public void setReaderList(List<Reader> readerList) { public void setReaders(List<Reader> readerList) {
this.readerList = readerList; this.readers = readerList;
} }
public List<PrintedCard> getPrintedCardList() { public List<PrintedCard> getPrintedCardsAtLocation() {
return printedCardList; return printedCardsAtLocation;
} }
public void setPrintedCardList(List<PrintedCard> printedCardList) { public void setPrintedCardsAtLocation(List<PrintedCard> printedCardList) {
this.printedCardList = printedCardList; this.printedCardsAtLocation = printedCardList;
} }
@Override @Override
...@@ -102,7 +104,7 @@ public class Location implements ModelInterface { ...@@ -102,7 +104,7 @@ public class Location implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.Location[locationsId=" + getId() + "]"; return "fi.insomnia.bortal.model.Location[id=" + getId() + "]";
} }
/** /**
......
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "locations")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Location.java
@NamedQueries( {
@NamedQuery(name = "Location.findAll", query = "SELECT l FROM Location l"),
@NamedQuery(name = "Location.findByLocationsId", query = "SELECT l FROM Location l WHERE l.locationsId = :locationsId"),
@NamedQuery(name = "Location.findByLocationName", query = "SELECT l FROM Location l WHERE l.locationName = :locationName") })
public class Location implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "Location.findAll", query = "SELECT l FROM Location l"),
@NamedQuery(name = "Location.findByLocationsId", query = "SELECT l FROM Location l WHERE l.locationsId = :locationsId"),
@NamedQuery(name = "Location.findByLocationName", query = "SELECT l FROM Location l WHERE l.locationName = :locationName")})
public class Location implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Location.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "locations_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Location.java
private Integer locationsId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Location.java
@Column(name = "location_name", nullable = false, length = 2147483647)
private String locationName;
@OneToMany(mappedBy = "locationsId")
private List<Reader> readerList;
@OneToMany(mappedBy = "currentLocation")
private List<PrintedCard> printedCardList;
@Version
@Column(nullable = false)
private int jpaVersionField;
public Location() {
}
public Location(Integer locationsId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Location.java
this.locationsId = locationsId;
}
public Location(Integer locationsId, String locationName) {
this.locationsId = locationsId;
this.locationName = locationName;
}
public Integer getLocationsId() {
return locationsId;
}
public void setLocationsId(Integer locationsId) {
this.locationsId = locationsId;
}
=======
this.id = locationsId;
}
public Location(Integer locationsId, String locationName) {
this.id = locationsId;
this.locationName = locationName;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Location.java
public String getLocationName() {
return locationName;
}
public void setLocationName(String locationName) {
this.locationName = locationName;
}
public List<Reader> getReaderList() {
return readerList;
}
public void setReaderList(List<Reader> readerList) {
this.readerList = readerList;
}
public List<PrintedCard> getPrintedCardList() {
return printedCardList;
}
public void setPrintedCardList(List<PrintedCard> printedCardList) {
this.printedCardList = printedCardList;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Location.java
int hash = 0;
hash += (locationsId != null ? locationsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Location.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Location.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Location)) {
return false;
}
Location other = (Location) object;
if ((this.locationsId == null && other.locationsId != null)
|| (this.locationsId != null && !this.locationsId
.equals(other.locationsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Location)) {
return false;
}
Location other = (Location) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Location.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Location.java
return "fi.insomnia.bortal.model.Location[locationsId=" + locationsId
+ "]";
=======
return "fi.insomnia.bortal.model.Location[locationsId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Location.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
...@@ -20,33 +20,37 @@ import javax.persistence.Version; ...@@ -20,33 +20,37 @@ import javax.persistence.Version;
/** /**
* *
* @author jkj
*/ */
@Entity @Entity
@Table(name = "event_log") @Table(name = "event_log")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "LogEntry.findAll", query = "SELECT l FROM LogEntry l"), @NamedQuery(name = "LogEntry.findAll", query = "SELECT l FROM LogEntry l"),
@NamedQuery(name = "LogEntry.findByEventLogId", query = "SELECT l FROM LogEntry l WHERE l.eventLogId = :eventLogId"), @NamedQuery(name = "LogEntry.findById", query = "SELECT l FROM LogEntry l WHERE l.id = :id"),
@NamedQuery(name = "LogEntry.findByEventTime", query = "SELECT l FROM LogEntry l WHERE l.eventTime = :eventTime"), @NamedQuery(name = "LogEntry.findByTime", query = "SELECT l FROM LogEntry l WHERE l.time = :time"),
@NamedQuery(name = "LogEntry.findByEventDescription", query = "SELECT l FROM LogEntry l WHERE l.eventDescription = :eventDescription") }) @NamedQuery(name = "LogEntry.findByDescription", query = "SELECT l FROM LogEntry l WHERE l.description = :description") })
public class LogEntry implements ModelInterface { public class LogEntry implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "event_log_id", nullable = false) @Column(name = "event_log_id", nullable = false)
private Integer id; private Integer id;
@Column(name = "event_time", nullable = false) @Column(name = "event_time", nullable = false)
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
private Date eventTime; private Date time;
@Column(name = "event_description") @Column(name = "event_description")
private String eventDescription; private String description;
@JoinColumn(name = "event_log_types_id", referencedColumnName = "event_log_types_id", nullable = false) @JoinColumn(name = "event_log_types_id", referencedColumnName = "event_log_types_id", nullable = false)
@ManyToOne(optional = false) @ManyToOne(optional = false)
private LogEntryType eventLogTypesId; private LogEntryType type;
@JoinColumn(name = "users_id", referencedColumnName = "users_id") @JoinColumn(name = "users_id", referencedColumnName = "users_id")
@ManyToOne @ManyToOne
private User usersId; private User user;
@Version @Version
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
...@@ -60,39 +64,39 @@ public class LogEntry implements ModelInterface { ...@@ -60,39 +64,39 @@ public class LogEntry implements ModelInterface {
public LogEntry(Integer eventLogId, Date eventTime) { public LogEntry(Integer eventLogId, Date eventTime) {
this.id = eventLogId; this.id = eventLogId;
this.eventTime = eventTime; this.time = eventTime;
} }
public Date getEventTime() { public Date getTime() {
return eventTime; return time;
} }
public void setEventTime(Date eventTime) { public void setTime(Date eventTime) {
this.eventTime = eventTime; this.time = eventTime;
} }
public String getEventDescription() { public String getDescription() {
return eventDescription; return description;
} }
public void setEventDescription(String eventDescription) { public void setDescription(String eventDescription) {
this.eventDescription = eventDescription; this.description = eventDescription;
} }
public LogEntryType getEventLogTypesId() { public LogEntryType getType() {
return eventLogTypesId; return type;
} }
public void setEventLogTypesId(LogEntryType eventLogTypesId) { public void setType(LogEntryType eventLogTypesId) {
this.eventLogTypesId = eventLogTypesId; this.type = eventLogTypesId;
} }
public User getUsersId() { public User getUser() {
return usersId; return user;
} }
public void setUsersId(User usersId) { public void setUser(User usersId) {
this.usersId = usersId; this.user = usersId;
} }
@Override @Override
......
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "event_log")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntry.java
@NamedQueries( {
@NamedQuery(name = "LogEntry.findAll", query = "SELECT l FROM LogEntry l"),
@NamedQuery(name = "LogEntry.findByEventLogId", query = "SELECT l FROM LogEntry l WHERE l.eventLogId = :eventLogId"),
@NamedQuery(name = "LogEntry.findByEventTime", query = "SELECT l FROM LogEntry l WHERE l.eventTime = :eventTime"),
@NamedQuery(name = "LogEntry.findByEventDescription", query = "SELECT l FROM LogEntry l WHERE l.eventDescription = :eventDescription") })
public class LogEntry implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "LogEntry.findAll", query = "SELECT l FROM LogEntry l"),
@NamedQuery(name = "LogEntry.findByEventLogId", query = "SELECT l FROM LogEntry l WHERE l.eventLogId = :eventLogId"),
@NamedQuery(name = "LogEntry.findByEventTime", query = "SELECT l FROM LogEntry l WHERE l.eventTime = :eventTime"),
@NamedQuery(name = "LogEntry.findByEventDescription", query = "SELECT l FROM LogEntry l WHERE l.eventDescription = :eventDescription")})
public class LogEntry implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntry.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "event_log_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntry.java
private Integer eventLogId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntry.java
@Column(name = "event_time", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date eventTime;
@Column(name = "event_description", length = 2147483647)
private String eventDescription;
@JoinColumn(name = "event_log_types_id", referencedColumnName = "event_log_types_id", nullable = false)
@ManyToOne(optional = false)
private LogEntryType eventLogTypesId;
@JoinColumn(name = "users_id", referencedColumnName = "users_id")
@ManyToOne
private User usersId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public LogEntry() {
}
public LogEntry(Integer eventLogId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntry.java
this.eventLogId = eventLogId;
}
public LogEntry(Integer eventLogId, Date eventTime) {
this.eventLogId = eventLogId;
this.eventTime = eventTime;
}
public Integer getEventLogId() {
return eventLogId;
}
public void setEventLogId(Integer eventLogId) {
this.eventLogId = eventLogId;
}
=======
this.id = eventLogId;
}
public LogEntry(Integer eventLogId, Date eventTime) {
this.id = eventLogId;
this.eventTime = eventTime;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntry.java
public Date getEventTime() {
return eventTime;
}
public void setEventTime(Date eventTime) {
this.eventTime = eventTime;
}
public String getEventDescription() {
return eventDescription;
}
public void setEventDescription(String eventDescription) {
this.eventDescription = eventDescription;
}
public LogEntryType getEventLogTypesId() {
return eventLogTypesId;
}
public void setEventLogTypesId(LogEntryType eventLogTypesId) {
this.eventLogTypesId = eventLogTypesId;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntry.java
int hash = 0;
hash += (eventLogId != null ? eventLogId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntry.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntry.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof LogEntry)) {
return false;
}
LogEntry other = (LogEntry) object;
if ((this.eventLogId == null && other.eventLogId != null)
|| (this.eventLogId != null && !this.eventLogId
.equals(other.eventLogId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof LogEntry)) {
return false;
}
LogEntry other = (LogEntry) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntry.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntry.java
return "fi.insomnia.bortal.model.LogEntry[eventLogId=" + eventLogId
+ "]";
=======
return "fi.insomnia.bortal.model.LogEntry[eventLogId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntry.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
...@@ -18,25 +18,27 @@ import javax.persistence.Version; ...@@ -18,25 +18,27 @@ import javax.persistence.Version;
/** /**
* *
* @author jkj
*/ */
@Entity @Entity
@Table(name = "event_log_types") @Table(name = "event_log_types")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "LogEntryType.findAll", query = "SELECT l FROM LogEntryType l"), @NamedQuery(name = "LogEntryType.findAll", query = "SELECT l FROM LogEntryType l"),
@NamedQuery(name = "LogEntryType.findByEventLogTypesId", query = "SELECT l FROM LogEntryType l WHERE l.eventLogTypesId = :eventLogTypesId"), @NamedQuery(name = "LogEntryType.findById", query = "SELECT l FROM LogEntryType l WHERE l.id = :id"),
@NamedQuery(name = "LogEntryType.findByEventTypeDescription", query = "SELECT l FROM LogEntryType l WHERE l.eventTypeDescription = :eventTypeDescription") }) @NamedQuery(name = "LogEntryType.findByDescription", query = "SELECT l FROM LogEntryType l WHERE l.description = :description") })
public class LogEntryType implements ModelInterface { public class LogEntryType implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "event_log_types_id", nullable = false) @Column(name = "event_log_types_id", nullable = false)
private Integer id; private Integer id;
@Column(name = "event_type_description", nullable = false) @Column(name = "event_type_description", nullable = false)
private String eventTypeDescription; private String description;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "eventLogTypesId")
private List<LogEntry> logEntryList; @OneToMany(cascade = CascadeType.ALL, mappedBy = "type")
private List<LogEntry> logEntries;
@Version @Version
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
...@@ -50,23 +52,23 @@ public class LogEntryType implements ModelInterface { ...@@ -50,23 +52,23 @@ public class LogEntryType implements ModelInterface {
public LogEntryType(Integer eventLogTypesId, String eventTypeDescription) { public LogEntryType(Integer eventLogTypesId, String eventTypeDescription) {
this.id = eventLogTypesId; this.id = eventLogTypesId;
this.eventTypeDescription = eventTypeDescription; this.description = eventTypeDescription;
} }
public String getEventTypeDescription() { public String getDescription() {
return eventTypeDescription; return description;
} }
public void setEventTypeDescription(String eventTypeDescription) { public void setDescription(String eventTypeDescription) {
this.eventTypeDescription = eventTypeDescription; this.description = eventTypeDescription;
} }
public List<LogEntry> getLogEntryList() { public List<LogEntry> getLogEntries() {
return logEntryList; return logEntries;
} }
public void setLogEntryList(List<LogEntry> logEntryList) { public void setLogEntries(List<LogEntry> logEntryList) {
this.logEntryList = logEntryList; this.logEntries = logEntryList;
} }
@Override @Override
...@@ -93,8 +95,7 @@ public class LogEntryType implements ModelInterface { ...@@ -93,8 +95,7 @@ public class LogEntryType implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.LogEntryType[eventLogTypesId=" return "fi.insomnia.bortal.model.LogEntryType[id=" + getId() + "]";
+ getId() + "]";
} }
/** /**
......
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "event_log_types")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntryType.java
@NamedQueries( {
@NamedQuery(name = "LogEntryType.findAll", query = "SELECT l FROM LogEntryType l"),
@NamedQuery(name = "LogEntryType.findByEventLogTypesId", query = "SELECT l FROM LogEntryType l WHERE l.eventLogTypesId = :eventLogTypesId"),
@NamedQuery(name = "LogEntryType.findByEventTypeDescription", query = "SELECT l FROM LogEntryType l WHERE l.eventTypeDescription = :eventTypeDescription") })
public class LogEntryType implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "LogEntryType.findAll", query = "SELECT l FROM LogEntryType l"),
@NamedQuery(name = "LogEntryType.findByEventLogTypesId", query = "SELECT l FROM LogEntryType l WHERE l.eventLogTypesId = :eventLogTypesId"),
@NamedQuery(name = "LogEntryType.findByEventTypeDescription", query = "SELECT l FROM LogEntryType l WHERE l.eventTypeDescription = :eventTypeDescription")})
public class LogEntryType implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntryType.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "event_log_types_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntryType.java
private Integer eventLogTypesId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntryType.java
@Column(name = "event_type_description", nullable = false, length = 2147483647)
private String eventTypeDescription;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "eventLogTypesId")
private List<LogEntry> logEntryList;
@Version
@Column(nullable = false)
private int jpaVersionField;
public LogEntryType() {
}
public LogEntryType(Integer eventLogTypesId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntryType.java
this.eventLogTypesId = eventLogTypesId;
}
public LogEntryType(Integer eventLogTypesId, String eventTypeDescription) {
this.eventLogTypesId = eventLogTypesId;
this.eventTypeDescription = eventTypeDescription;
}
public Integer getEventLogTypesId() {
return eventLogTypesId;
}
public void setEventLogTypesId(Integer eventLogTypesId) {
this.eventLogTypesId = eventLogTypesId;
}
=======
this.id = eventLogTypesId;
}
public LogEntryType(Integer eventLogTypesId, String eventTypeDescription) {
this.id = eventLogTypesId;
this.eventTypeDescription = eventTypeDescription;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntryType.java
public String getEventTypeDescription() {
return eventTypeDescription;
}
public void setEventTypeDescription(String eventTypeDescription) {
this.eventTypeDescription = eventTypeDescription;
}
public List<LogEntry> getLogEntryList() {
return logEntryList;
}
public void setLogEntryList(List<LogEntry> logEntryList) {
this.logEntryList = logEntryList;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntryType.java
int hash = 0;
hash += (eventLogTypesId != null ? eventLogTypesId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntryType.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntryType.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof LogEntryType)) {
return false;
}
LogEntryType other = (LogEntryType) object;
if ((this.eventLogTypesId == null && other.eventLogTypesId != null)
|| (this.eventLogTypesId != null && !this.eventLogTypesId
.equals(other.eventLogTypesId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof LogEntryType)) {
return false;
}
LogEntryType other = (LogEntryType) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntryType.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntryType.java
return "fi.insomnia.bortal.model.LogEntryType[eventLogTypesId="
+ eventLogTypesId + "]";
=======
return "fi.insomnia.bortal.model.LogEntryType[eventLogTypesId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/LogEntryType.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
...@@ -26,10 +26,10 @@ import javax.persistence.Version; ...@@ -26,10 +26,10 @@ import javax.persistence.Version;
@Table(name = "news") @Table(name = "news")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "News.findAll", query = "SELECT n FROM News n"), @NamedQuery(name = "News.findAll", query = "SELECT n FROM News n"),
@NamedQuery(name = "News.findByNewsId", query = "SELECT n FROM News n WHERE n.newsId = :newsId"), @NamedQuery(name = "News.findById", query = "SELECT n FROM News n WHERE n.id = :id"),
@NamedQuery(name = "News.findByTitle", query = "SELECT n FROM News n WHERE n.title = :title"), @NamedQuery(name = "News.findByTitle", query = "SELECT n FROM News n WHERE n.title = :title"),
@NamedQuery(name = "News.findByBody", query = "SELECT n FROM News n WHERE n.body = :body"), @NamedQuery(name = "News.findByBody", query = "SELECT n FROM News n WHERE n.body = :body"),
@NamedQuery(name = "News.findByAbstract1", query = "SELECT n FROM News n WHERE n.abstract1 = :abstract1"), @NamedQuery(name = "News.findByAbstract", query = "SELECT n FROM News n WHERE n.bodyAbstract = :bodyAbstract"),
@NamedQuery(name = "News.findByPublish", query = "SELECT n FROM News n WHERE n.publish = :publish"), @NamedQuery(name = "News.findByPublish", query = "SELECT n FROM News n WHERE n.publish = :publish"),
@NamedQuery(name = "News.findByExpire", query = "SELECT n FROM News n WHERE n.expire = :expire"), @NamedQuery(name = "News.findByExpire", query = "SELECT n FROM News n WHERE n.expire = :expire"),
@NamedQuery(name = "News.findByPriority", query = "SELECT n FROM News n WHERE n.priority = :priority") }) @NamedQuery(name = "News.findByPriority", query = "SELECT n FROM News n WHERE n.priority = :priority") })
...@@ -42,22 +42,28 @@ public class News implements ModelInterface { ...@@ -42,22 +42,28 @@ public class News implements ModelInterface {
@Column(name = "title", nullable = false) @Column(name = "title", nullable = false)
private String title; private String title;
@Column(name = "body") @Column(name = "body")
private String body; private String body;
@Column(name = "abstract") @Column(name = "abstract")
private String abstract1; private String bodyAbstract;
@Column(name = "publish") @Column(name = "publish")
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
private Date publish; private Date publish;
@Column(name = "expire") @Column(name = "expire")
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
private Date expire; private Date expire;
@Column(name = "priority", nullable = false) @Column(name = "priority", nullable = false)
private int priority; private int priority;
@JoinColumn(name = "news_groups_id", referencedColumnName = "news_groups_id", nullable = false) @JoinColumn(name = "news_groups_id", referencedColumnName = "news_groups_id", nullable = false)
@ManyToOne(optional = false) @ManyToOne(optional = false)
private NewsGroup newsGroupsId; private NewsGroup group;
@Version @Version
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
...@@ -91,12 +97,12 @@ public class News implements ModelInterface { ...@@ -91,12 +97,12 @@ public class News implements ModelInterface {
this.body = body; this.body = body;
} }
public String getAbstract1() { public String getBodyAbstract() {
return abstract1; return bodyAbstract;
} }
public void setAbstract1(String abstract1) { public void setBodyAbstract(String abstract1) {
this.abstract1 = abstract1; this.bodyAbstract = abstract1;
} }
public Date getPublish() { public Date getPublish() {
...@@ -123,12 +129,12 @@ public class News implements ModelInterface { ...@@ -123,12 +129,12 @@ public class News implements ModelInterface {
this.priority = priority; this.priority = priority;
} }
public NewsGroup getNewsGroupsId() { public NewsGroup getGroup() {
return newsGroupsId; return group;
} }
public void setNewsGroupsId(NewsGroup newsGroupsId) { public void setGroup(NewsGroup newsGroupsId) {
this.newsGroupsId = newsGroupsId; this.group = newsGroupsId;
} }
@Override @Override
...@@ -155,7 +161,7 @@ public class News implements ModelInterface { ...@@ -155,7 +161,7 @@ public class News implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.News[newsId=" + getId() + "]"; return "fi.insomnia.bortal.model.News[id=" + getId() + "]";
} }
/** /**
......
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "news")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/News.java
@NamedQueries( {
@NamedQuery(name = "News.findAll", query = "SELECT n FROM News n"),
@NamedQuery(name = "News.findByNewsId", query = "SELECT n FROM News n WHERE n.newsId = :newsId"),
@NamedQuery(name = "News.findByTitle", query = "SELECT n FROM News n WHERE n.title = :title"),
@NamedQuery(name = "News.findByBody", query = "SELECT n FROM News n WHERE n.body = :body"),
@NamedQuery(name = "News.findByAbstract1", query = "SELECT n FROM News n WHERE n.abstract1 = :abstract1"),
@NamedQuery(name = "News.findByPublish", query = "SELECT n FROM News n WHERE n.publish = :publish"),
@NamedQuery(name = "News.findByExpire", query = "SELECT n FROM News n WHERE n.expire = :expire"),
@NamedQuery(name = "News.findByPriority", query = "SELECT n FROM News n WHERE n.priority = :priority") })
public class News implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "News.findAll", query = "SELECT n FROM News n"),
@NamedQuery(name = "News.findByNewsId", query = "SELECT n FROM News n WHERE n.newsId = :newsId"),
@NamedQuery(name = "News.findByTitle", query = "SELECT n FROM News n WHERE n.title = :title"),
@NamedQuery(name = "News.findByBody", query = "SELECT n FROM News n WHERE n.body = :body"),
@NamedQuery(name = "News.findByAbstract1", query = "SELECT n FROM News n WHERE n.abstract1 = :abstract1"),
@NamedQuery(name = "News.findByPublish", query = "SELECT n FROM News n WHERE n.publish = :publish"),
@NamedQuery(name = "News.findByExpire", query = "SELECT n FROM News n WHERE n.expire = :expire"),
@NamedQuery(name = "News.findByPriority", query = "SELECT n FROM News n WHERE n.priority = :priority")})
public class News implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/News.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "news_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/News.java
private Integer newsId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/News.java
@Column(name = "title", nullable = false, length = 2147483647)
private String title;
@Column(name = "body", length = 2147483647)
private String body;
@Column(name = "abstract", length = 2147483647)
private String abstract1;
@Column(name = "publish")
@Temporal(TemporalType.TIMESTAMP)
private Date publish;
@Column(name = "expire")
@Temporal(TemporalType.TIMESTAMP)
private Date expire;
@Column(name = "priority", nullable = false)
private int priority;
@JoinColumn(name = "news_groups_id", referencedColumnName = "news_groups_id", nullable = false)
@ManyToOne(optional = false)
private NewsGroup newsGroupsId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public News() {
}
public News(Integer newsId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/News.java
this.newsId = newsId;
}
public News(Integer newsId, String title, int priority) {
this.newsId = newsId;
this.title = title;
this.priority = priority;
}
public Integer getNewsId() {
return newsId;
}
public void setNewsId(Integer newsId) {
this.newsId = newsId;
}
=======
this.id = newsId;
}
public News(Integer newsId, String title, int priority) {
this.id = newsId;
this.title = title;
this.priority = priority;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/News.java
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public String getAbstract1() {
return abstract1;
}
public void setAbstract1(String abstract1) {
this.abstract1 = abstract1;
}
public Date getPublish() {
return publish;
}
public void setPublish(Date publish) {
this.publish = publish;
}
public Date getExpire() {
return expire;
}
public void setExpire(Date expire) {
this.expire = expire;
}
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
public NewsGroup getNewsGroupsId() {
return newsGroupsId;
}
public void setNewsGroupsId(NewsGroup newsGroupsId) {
this.newsGroupsId = newsGroupsId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/News.java
int hash = 0;
hash += (newsId != null ? newsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/News.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/News.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof News)) {
return false;
}
News other = (News) object;
if ((this.newsId == null && other.newsId != null)
|| (this.newsId != null && !this.newsId.equals(other.newsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof News)) {
return false;
}
News other = (News) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/News.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/News.java
return "fi.insomnia.bortal.model.News[newsId=" + newsId + "]";
=======
return "fi.insomnia.bortal.model.News[newsId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/News.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
...@@ -26,29 +26,34 @@ import javax.persistence.Version; ...@@ -26,29 +26,34 @@ import javax.persistence.Version;
@Table(name = "news_groups") @Table(name = "news_groups")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "NewsGroup.findAll", query = "SELECT n FROM NewsGroup n"), @NamedQuery(name = "NewsGroup.findAll", query = "SELECT n FROM NewsGroup n"),
@NamedQuery(name = "NewsGroup.findByNewsGroupsId", query = "SELECT n FROM NewsGroup n WHERE n.newsGroupsId = :newsGroupsId"), @NamedQuery(name = "NewsGroup.findById", query = "SELECT n FROM NewsGroup n WHERE n.id = :id"),
@NamedQuery(name = "NewsGroup.findByGroupName", query = "SELECT n FROM NewsGroup n WHERE n.groupName = :groupName"), @NamedQuery(name = "NewsGroup.findByName", query = "SELECT n FROM NewsGroup n WHERE n.name = :name"),
@NamedQuery(name = "NewsGroup.findByGroupDescription", query = "SELECT n FROM NewsGroup n WHERE n.groupDescription = :groupDescription"), @NamedQuery(name = "NewsGroup.findByDescription", query = "SELECT n FROM NewsGroup n WHERE n.description = :description"),
@NamedQuery(name = "NewsGroup.findByPriority", query = "SELECT n FROM NewsGroup n WHERE n.priority = :priority") }) @NamedQuery(name = "NewsGroup.findByPriority", query = "SELECT n FROM NewsGroup n WHERE n.priority = :priority") })
public class NewsGroup implements ModelInterface { public class NewsGroup implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "news_groups_id", nullable = false) @Column(name = "news_groups_id", nullable = false)
private Integer id; private Integer id;
@Column(name = "group_name", nullable = false) @Column(name = "group_name", nullable = false)
private String groupName; private String name;
@Column(name = "group_description") @Column(name = "group_description")
private String groupDescription; private String description;
@Column(name = "priority", nullable = false) @Column(name = "priority", nullable = false)
private int priority; private int priority;
@JoinColumn(name = "access_rights_id", referencedColumnName = "access_rights_id", nullable = false) @JoinColumn(name = "access_rights_id", referencedColumnName = "access_rights_id", nullable = false)
@ManyToOne(optional = false) @ManyToOne(optional = false)
private AccessRight accessRightsId; private AccessRight accessRight;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "newsGroupsId")
private List<News> newsList; @OneToMany(cascade = CascadeType.ALL, mappedBy = "group")
private List<News> news;
@Version @Version
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
...@@ -62,24 +67,24 @@ public class NewsGroup implements ModelInterface { ...@@ -62,24 +67,24 @@ public class NewsGroup implements ModelInterface {
public NewsGroup(Integer newsGroupsId, String groupName, int priority) { public NewsGroup(Integer newsGroupsId, String groupName, int priority) {
this.id = newsGroupsId; this.id = newsGroupsId;
this.groupName = groupName; this.name = groupName;
this.priority = priority; this.priority = priority;
} }
public String getGroupName() { public String getName() {
return groupName; return name;
} }
public void setGroupName(String groupName) { public void setName(String groupName) {
this.groupName = groupName; this.name = groupName;
} }
public String getGroupDescription() { public String getDescription() {
return groupDescription; return description;
} }
public void setGroupDescription(String groupDescription) { public void setDescription(String groupDescription) {
this.groupDescription = groupDescription; this.description = groupDescription;
} }
public int getPriority() { public int getPriority() {
...@@ -90,20 +95,20 @@ public class NewsGroup implements ModelInterface { ...@@ -90,20 +95,20 @@ public class NewsGroup implements ModelInterface {
this.priority = priority; this.priority = priority;
} }
public AccessRight getAccessRightsId() { public AccessRight getAccessRight() {
return accessRightsId; return accessRight;
} }
public void setAccessRightsId(AccessRight accessRightsId) { public void setAccessRight(AccessRight accessRightsId) {
this.accessRightsId = accessRightsId; this.accessRight = accessRightsId;
} }
public List<News> getNewsList() { public List<News> getNews() {
return newsList; return news;
} }
public void setNewsList(List<News> newsList) { public void setNews(List<News> newsList) {
this.newsList = newsList; this.news = newsList;
} }
@Override @Override
......
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "news_groups")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/NewsGroup.java
@NamedQueries( {
@NamedQuery(name = "NewsGroup.findAll", query = "SELECT n FROM NewsGroup n"),
@NamedQuery(name = "NewsGroup.findByNewsGroupsId", query = "SELECT n FROM NewsGroup n WHERE n.newsGroupsId = :newsGroupsId"),
@NamedQuery(name = "NewsGroup.findByGroupName", query = "SELECT n FROM NewsGroup n WHERE n.groupName = :groupName"),
@NamedQuery(name = "NewsGroup.findByGroupDescription", query = "SELECT n FROM NewsGroup n WHERE n.groupDescription = :groupDescription"),
@NamedQuery(name = "NewsGroup.findByPriority", query = "SELECT n FROM NewsGroup n WHERE n.priority = :priority") })
public class NewsGroup implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "NewsGroup.findAll", query = "SELECT n FROM NewsGroup n"),
@NamedQuery(name = "NewsGroup.findByNewsGroupsId", query = "SELECT n FROM NewsGroup n WHERE n.newsGroupsId = :newsGroupsId"),
@NamedQuery(name = "NewsGroup.findByGroupName", query = "SELECT n FROM NewsGroup n WHERE n.groupName = :groupName"),
@NamedQuery(name = "NewsGroup.findByGroupDescription", query = "SELECT n FROM NewsGroup n WHERE n.groupDescription = :groupDescription"),
@NamedQuery(name = "NewsGroup.findByPriority", query = "SELECT n FROM NewsGroup n WHERE n.priority = :priority")})
public class NewsGroup implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/NewsGroup.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "news_groups_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/NewsGroup.java
private Integer newsGroupsId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/NewsGroup.java
@Column(name = "group_name", nullable = false, length = 2147483647)
private String groupName;
@Column(name = "group_description", length = 2147483647)
private String groupDescription;
@Column(name = "priority", nullable = false)
private int priority;
@JoinColumn(name = "access_rights_id", referencedColumnName = "access_rights_id", nullable = false)
@ManyToOne(optional = false)
private AccessRight accessRightsId;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "newsGroupsId")
private List<News> newsList;
@Version
@Column(nullable = false)
private int jpaVersionField;
public NewsGroup() {
}
public NewsGroup(Integer newsGroupsId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/NewsGroup.java
this.newsGroupsId = newsGroupsId;
}
public NewsGroup(Integer newsGroupsId, String groupName, int priority) {
this.newsGroupsId = newsGroupsId;
this.groupName = groupName;
this.priority = priority;
}
public Integer getNewsGroupsId() {
return newsGroupsId;
}
public void setNewsGroupsId(Integer newsGroupsId) {
this.newsGroupsId = newsGroupsId;
}
=======
this.id = newsGroupsId;
}
public NewsGroup(Integer newsGroupsId, String groupName, int priority) {
this.id = newsGroupsId;
this.groupName = groupName;
this.priority = priority;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/NewsGroup.java
public String getGroupName() {
return groupName;
}
public void setGroupName(String groupName) {
this.groupName = groupName;
}
public String getGroupDescription() {
return groupDescription;
}
public void setGroupDescription(String groupDescription) {
this.groupDescription = groupDescription;
}
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
public AccessRight getAccessRightsId() {
return accessRightsId;
}
public void setAccessRightsId(AccessRight accessRightsId) {
this.accessRightsId = accessRightsId;
}
public List<News> getNewsList() {
return newsList;
}
public void setNewsList(List<News> newsList) {
this.newsList = newsList;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/NewsGroup.java
int hash = 0;
hash += (newsGroupsId != null ? newsGroupsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/NewsGroup.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/NewsGroup.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof NewsGroup)) {
return false;
}
NewsGroup other = (NewsGroup) object;
if ((this.newsGroupsId == null && other.newsGroupsId != null)
|| (this.newsGroupsId != null && !this.newsGroupsId
.equals(other.newsGroupsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof NewsGroup)) {
return false;
}
NewsGroup other = (NewsGroup) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/NewsGroup.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/NewsGroup.java
return "fi.insomnia.bortal.model.NewsGroup[newsGroupsId="
+ newsGroupsId + "]";
=======
return "fi.insomnia.bortal.model.NewsGroup[newsGroupsId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/NewsGroup.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
...@@ -17,19 +17,18 @@ import javax.persistence.Version; ...@@ -17,19 +17,18 @@ import javax.persistence.Version;
/** /**
* *
* @author jkj
*/ */
@Entity @Entity
@Table(name = "places") @Table(name = "places")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "Place.findAll", query = "SELECT p FROM Place p"), @NamedQuery(name = "Place.findAll", query = "SELECT p FROM Place p"),
@NamedQuery(name = "Place.findByPlacesId", query = "SELECT p FROM Place p WHERE p.placesId = :placesId"), @NamedQuery(name = "Place.findByDescription", query = "SELECT p FROM Place p WHERE p.description = :description"),
@NamedQuery(name = "Place.findByPlaceDescription", query = "SELECT p FROM Place p WHERE p.placeDescription = :placeDescription"), @NamedQuery(name = "Place.findById", query = "SELECT p FROM Place p WHERE p.id = :id"),
@NamedQuery(name = "Place.findByPlaceName", query = "SELECT p FROM Place p WHERE p.placeName = :placeName"), @NamedQuery(name = "Place.findByName", query = "SELECT p FROM Place p WHERE p.name = :name"),
@NamedQuery(name = "Place.findByMapX", query = "SELECT p FROM Place p WHERE p.mapX = :mapX"), @NamedQuery(name = "Place.findByMapX", query = "SELECT p FROM Place p WHERE p.mapX = :mapX"),
@NamedQuery(name = "Place.findByMapY", query = "SELECT p FROM Place p WHERE p.mapY = :mapY"), @NamedQuery(name = "Place.findByMapY", query = "SELECT p FROM Place p WHERE p.mapY = :mapY"),
@NamedQuery(name = "Place.findByPlaceDetails", query = "SELECT p FROM Place p WHERE p.placeDetails = :placeDetails"), @NamedQuery(name = "Place.findByDetails", query = "SELECT p FROM Place p WHERE p.details = :details"),
@NamedQuery(name = "Place.findByPlaceCode", query = "SELECT p FROM Place p WHERE p.placeCode = :placeCode") }) @NamedQuery(name = "Place.findByCode", query = "SELECT p FROM Place p WHERE p.code = :code") })
public class Place implements ModelInterface { public class Place implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -37,33 +36,47 @@ public class Place implements ModelInterface { ...@@ -37,33 +36,47 @@ public class Place implements ModelInterface {
@Column(name = "places_id", nullable = false) @Column(name = "places_id", nullable = false)
private Integer id; private Integer id;
@Column(name = "place_description") @Column(name = "place_description")
private String placeDescription; private String description;
@Column(name = "place_name") @Column(name = "place_name")
private String placeName; private String name;
@Column(name = "map_x") @Column(name = "map_x")
private Integer mapX; private Integer mapX;
@Column(name = "map_y") @Column(name = "map_y")
private Integer mapY; private Integer mapY;
@Column(name = "place_details") @Column(name = "place_details")
private String placeDetails; private String details;
@Column(name = "place_code") @Column(name = "place_code")
private String placeCode; private String code;
@OneToOne(mappedBy = "placeReservation") @OneToOne(mappedBy = "placeReservation")
private GroupMembership placeReserver; private GroupMembership placeReserver;
/**
* Which group has bought the place
*/
@JoinColumn(name = "groups_id", referencedColumnName = "groups_id") @JoinColumn(name = "groups_id", referencedColumnName = "groups_id")
@ManyToOne @ManyToOne
private PlaceGroup groupsId; private PlaceGroup placeGroup;
@JoinColumn(name = "maps_id", referencedColumnName = "maps_id", nullable = false) @JoinColumn(name = "maps_id", referencedColumnName = "maps_id", nullable = false)
@ManyToOne(optional = false) @ManyToOne(optional = false)
private EventMap map; private EventMap map;
/**
* Which ticket type is this place sold as
*/
@JoinColumn(name = "products_id", referencedColumnName = "products_id", nullable = false) @JoinColumn(name = "products_id", referencedColumnName = "products_id", nullable = false)
@ManyToOne(optional = false) @ManyToOne(optional = false)
private Product productsId; private Product product;
/**
* Who is the current currentUser (mapped with code printed on the place) of
* the place. Used in Vectorama currentUser tracking.
*/
@JoinColumn(name = "users_id", referencedColumnName = "users_id") @JoinColumn(name = "users_id", referencedColumnName = "users_id")
@ManyToOne @ManyToOne
private User usersId; private User currentUser;
@Version @Version
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
...@@ -75,20 +88,20 @@ public class Place implements ModelInterface { ...@@ -75,20 +88,20 @@ public class Place implements ModelInterface {
this.id = placesId; this.id = placesId;
} }
public String getPlaceDescription() { public String getDescription() {
return placeDescription; return description;
} }
public void setPlaceDescription(String placeDescription) { public void setDescription(String placeDescription) {
this.placeDescription = placeDescription; this.description = placeDescription;
} }
public String getPlaceName() { public String getName() {
return placeName; return name;
} }
public void setPlaceName(String placeName) { public void setName(String placeName) {
this.placeName = placeName; this.name = placeName;
} }
public Integer getMapX() { public Integer getMapX() {
...@@ -107,28 +120,28 @@ public class Place implements ModelInterface { ...@@ -107,28 +120,28 @@ public class Place implements ModelInterface {
this.mapY = mapY; this.mapY = mapY;
} }
public String getPlaceDetails() { public String getDetails() {
return placeDetails; return details;
} }
public void setPlaceDetails(String placeDetails) { public void setDetails(String placeDetails) {
this.placeDetails = placeDetails; this.details = placeDetails;
} }
public String getPlaceCode() { public String getCode() {
return placeCode; return code;
} }
public void setPlaceCode(String placeCode) { public void setCode(String placeCode) {
this.placeCode = placeCode; this.code = placeCode;
} }
public PlaceGroup getGroupsId() { public PlaceGroup getPlaceGroup() {
return groupsId; return placeGroup;
} }
public void setGroupsId(PlaceGroup groupsId) { public void setPlaceGroup(PlaceGroup groupsId) {
this.groupsId = groupsId; this.placeGroup = groupsId;
} }
public EventMap getMap() { public EventMap getMap() {
...@@ -139,20 +152,20 @@ public class Place implements ModelInterface { ...@@ -139,20 +152,20 @@ public class Place implements ModelInterface {
this.map = mapsId; this.map = mapsId;
} }
public Product getProductsId() { public Product getProduct() {
return productsId; return product;
} }
public void setProductsId(Product productsId) { public void setProduct(Product productsId) {
this.productsId = productsId; this.product = productsId;
} }
public User getUsersId() { public User getCurrentUser() {
return usersId; return currentUser;
} }
public void setUsersId(User usersId) { public void setCurrentUser(User usersId) {
this.usersId = usersId; this.currentUser = usersId;
} }
@Override @Override
...@@ -179,7 +192,7 @@ public class Place implements ModelInterface { ...@@ -179,7 +192,7 @@ public class Place implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.Place[placesId=" + getId() + "]"; return "fi.insomnia.bortal.model.Place[id=" + getId() + "]";
} }
/** /**
......
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "places")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Place.java
@NamedQueries( {
@NamedQuery(name = "Place.findAll", query = "SELECT p FROM Place p"),
@NamedQuery(name = "Place.findByPlacesId", query = "SELECT p FROM Place p WHERE p.placesId = :placesId"),
@NamedQuery(name = "Place.findByPlaceDescription", query = "SELECT p FROM Place p WHERE p.placeDescription = :placeDescription"),
@NamedQuery(name = "Place.findByPlaceName", query = "SELECT p FROM Place p WHERE p.placeName = :placeName"),
@NamedQuery(name = "Place.findByMapX", query = "SELECT p FROM Place p WHERE p.mapX = :mapX"),
@NamedQuery(name = "Place.findByMapY", query = "SELECT p FROM Place p WHERE p.mapY = :mapY"),
@NamedQuery(name = "Place.findByPlaceDetails", query = "SELECT p FROM Place p WHERE p.placeDetails = :placeDetails"),
@NamedQuery(name = "Place.findByPlaceCode", query = "SELECT p FROM Place p WHERE p.placeCode = :placeCode") })
public class Place implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "Place.findAll", query = "SELECT p FROM Place p"),
@NamedQuery(name = "Place.findByPlacesId", query = "SELECT p FROM Place p WHERE p.placesId = :placesId"),
@NamedQuery(name = "Place.findByPlaceDescription", query = "SELECT p FROM Place p WHERE p.placeDescription = :placeDescription"),
@NamedQuery(name = "Place.findByPlaceName", query = "SELECT p FROM Place p WHERE p.placeName = :placeName"),
@NamedQuery(name = "Place.findByMapX", query = "SELECT p FROM Place p WHERE p.mapX = :mapX"),
@NamedQuery(name = "Place.findByMapY", query = "SELECT p FROM Place p WHERE p.mapY = :mapY"),
@NamedQuery(name = "Place.findByPlaceDetails", query = "SELECT p FROM Place p WHERE p.placeDetails = :placeDetails"),
@NamedQuery(name = "Place.findByPlaceCode", query = "SELECT p FROM Place p WHERE p.placeCode = :placeCode")})
public class Place implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Place.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "places_id", nullable = false)
private Integer id;
@Column(name = "place_description", length = 2147483647)
private String placeDescription;
@Column(name = "place_name", length = 2147483647)
private String placeName;
@Column(name = "map_x")
private Integer mapX;
@Column(name = "map_y")
private Integer mapY;
@Column(name = "place_details", length = 2147483647)
private String placeDetails;
@Column(name = "place_code", length = 2147483647)
private String placeCode;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "placeReservation")
private List<GroupMembership> groupMembershipList;
@JoinColumn(name = "groups_id", referencedColumnName = "groups_id")
@ManyToOne
private PlaceGroup groupsId;
@JoinColumn(name = "maps_id", referencedColumnName = "maps_id", nullable = false)
@ManyToOne(optional = false)
private EventMap mapsId;
@JoinColumn(name = "products_id", referencedColumnName = "products_id", nullable = false)
@ManyToOne(optional = false)
private Product productsId;
@JoinColumn(name = "users_id", referencedColumnName = "users_id")
@ManyToOne
private User usersId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public Place() {
}
public Place(Integer placesId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Place.java
this.placesId = placesId;
}
public Integer getPlacesId() {
return placesId;
}
public void setPlacesId(Integer placesId) {
this.placesId = placesId;
=======
this.id = placesId;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Place.java
}
public String getPlaceDescription() {
return placeDescription;
}
public void setPlaceDescription(String placeDescription) {
this.placeDescription = placeDescription;
}
public String getPlaceName() {
return placeName;
}
public void setPlaceName(String placeName) {
this.placeName = placeName;
}
public Integer getMapX() {
return mapX;
}
public void setMapX(Integer mapX) {
this.mapX = mapX;
}
public Integer getMapY() {
return mapY;
}
public void setMapY(Integer mapY) {
this.mapY = mapY;
}
public String getPlaceDetails() {
return placeDetails;
}
public void setPlaceDetails(String placeDetails) {
this.placeDetails = placeDetails;
}
public String getPlaceCode() {
return placeCode;
}
public void setPlaceCode(String placeCode) {
this.placeCode = placeCode;
}
public List<GroupMembership> getGroupMembershipList() {
return groupMembershipList;
}
public void setGroupMembershipList(List<GroupMembership> groupMembershipList) {
this.groupMembershipList = groupMembershipList;
}
public PlaceGroup getGroupsId() {
return groupsId;
}
public void setGroupsId(PlaceGroup groupsId) {
this.groupsId = groupsId;
}
public EventMap getMapsId() {
return mapsId;
}
public void setMapsId(EventMap mapsId) {
this.mapsId = mapsId;
}
public Product getProductsId() {
return productsId;
}
public void setProductsId(Product productsId) {
this.productsId = productsId;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Place.java
int hash = 0;
hash += (placesId != null ? placesId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Place.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Place.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Place)) {
return false;
}
Place other = (Place) object;
if ((this.placesId == null && other.placesId != null)
|| (this.placesId != null && !this.placesId
.equals(other.placesId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Place)) {
return false;
}
Place other = (Place) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Place.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Place.java
return "fi.insomnia.bortal.model.Place[placesId=" + placesId + "]";
=======
return "fi.insomnia.bortal.model.Place[placesId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Place.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
...@@ -23,19 +23,18 @@ import javax.persistence.Version; ...@@ -23,19 +23,18 @@ import javax.persistence.Version;
/** /**
* *
* @author jkj
*/ */
@Entity @Entity
@Table(name = "groups") @Table(name = "groups")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "PlaceGroup.findAll", query = "SELECT p FROM PlaceGroup p"), @NamedQuery(name = "PlaceGroup.findAll", query = "SELECT p FROM PlaceGroup p"),
@NamedQuery(name = "PlaceGroup.findByGroupsId", query = "SELECT p FROM PlaceGroup p WHERE p.groupsId = :groupsId"), @NamedQuery(name = "PlaceGroup.findById", query = "SELECT p FROM PlaceGroup p WHERE p.id = :id"),
@NamedQuery(name = "PlaceGroup.findByGroupCreated", query = "SELECT p FROM PlaceGroup p WHERE p.groupCreated = :groupCreated"), @NamedQuery(name = "PlaceGroup.findByCreated", query = "SELECT p FROM PlaceGroup p WHERE p.created = :created"),
@NamedQuery(name = "PlaceGroup.findByGroupEdited", query = "SELECT p FROM PlaceGroup p WHERE p.groupEdited = :groupEdited"), @NamedQuery(name = "PlaceGroup.findByEdited", query = "SELECT p FROM PlaceGroup p WHERE p.edited = :edited"),
@NamedQuery(name = "PlaceGroup.findByGroupCode", query = "SELECT p FROM PlaceGroup p WHERE p.groupCode = :groupCode"), @NamedQuery(name = "PlaceGroup.findByCode", query = "SELECT p FROM PlaceGroup p WHERE p.code = :code"),
@NamedQuery(name = "PlaceGroup.findByGroupName", query = "SELECT p FROM PlaceGroup p WHERE p.groupName = :groupName"), @NamedQuery(name = "PlaceGroup.findByName", query = "SELECT p FROM PlaceGroup p WHERE p.name = :name"),
@NamedQuery(name = "PlaceGroup.findByGroupActive", query = "SELECT p FROM PlaceGroup p WHERE p.groupActive = :groupActive"), @NamedQuery(name = "PlaceGroup.findByActive", query = "SELECT p FROM PlaceGroup p WHERE p.active = :active"),
@NamedQuery(name = "PlaceGroup.findByGroupDetails", query = "SELECT p FROM PlaceGroup p WHERE p.groupDetails = :groupDetails") }) @NamedQuery(name = "PlaceGroup.findByDetails", query = "SELECT p FROM PlaceGroup p WHERE p.details = :details") })
public class PlaceGroup implements ModelInterface { public class PlaceGroup implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -45,30 +44,30 @@ public class PlaceGroup implements ModelInterface { ...@@ -45,30 +44,30 @@ public class PlaceGroup implements ModelInterface {
@Column(name = "group_created", nullable = false) @Column(name = "group_created", nullable = false)
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
private Date groupCreated; private Date created;
@Column(name = "group_edited", nullable = false) @Column(name = "group_edited", nullable = false)
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
private Date groupEdited; private Date edited;
@Column(name = "group_code") @Column(name = "group_code")
private String groupCode; private String code;
@Column(name = "group_name") @Column(name = "group_name")
private String groupName; private String name;
@Column(name = "group_active", nullable = false) @Column(name = "group_active", nullable = false)
private boolean groupActive; private boolean active;
@Column(name = "group_details") @Column(name = "group_details")
private String groupDetails; private String details;
@JoinColumn(name = "group_creator", referencedColumnName = "users_id") @JoinColumn(name = "group_creator", referencedColumnName = "users_id")
@ManyToOne @ManyToOne
private User groupCreator; private User creator;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "groupsId") @OneToMany(cascade = CascadeType.ALL, mappedBy = "placeGroup")
private List<GroupMembership> groupMembershipList; private List<GroupMembership> members;
@OneToMany(mappedBy = "placeGroup") @OneToMany(mappedBy = "placeGroup")
private List<Place> places; private List<Place> places;
...@@ -87,73 +86,73 @@ public class PlaceGroup implements ModelInterface { ...@@ -87,73 +86,73 @@ public class PlaceGroup implements ModelInterface {
public PlaceGroup(Integer groupsId, Date groupCreated, Date groupEdited, public PlaceGroup(Integer groupsId, Date groupCreated, Date groupEdited,
boolean groupActive) { boolean groupActive) {
this.id = groupsId; this.id = groupsId;
this.groupCreated = groupCreated; this.created = groupCreated;
this.groupEdited = groupEdited; this.edited = groupEdited;
this.groupActive = groupActive; this.active = groupActive;
} }
public Date getGroupCreated() { public Date getCreated() {
return groupCreated; return created;
} }
public void setGroupCreated(Date groupCreated) { public void setCreated(Date groupCreated) {
this.groupCreated = groupCreated; this.created = groupCreated;
} }
public Date getGroupEdited() { public Date getEdited() {
return groupEdited; return edited;
} }
public void setGroupEdited(Date groupEdited) { public void setEdited(Date groupEdited) {
this.groupEdited = groupEdited; this.edited = groupEdited;
} }
public String getGroupCode() { public String getCode() {
return groupCode; return code;
} }
public void setGroupCode(String groupCode) { public void setCode(String groupCode) {
this.groupCode = groupCode; this.code = groupCode;
} }
public String getGroupName() { public String getName() {
return groupName; return name;
} }
public void setGroupName(String groupName) { public void setName(String groupName) {
this.groupName = groupName; this.name = groupName;
} }
public boolean getGroupActive() { public boolean getActive() {
return groupActive; return active;
} }
public void setGroupActive(boolean groupActive) { public void setActive(boolean groupActive) {
this.groupActive = groupActive; this.active = groupActive;
} }
public String getGroupDetails() { public String getDetails() {
return groupDetails; return details;
} }
public void setGroupDetails(String groupDetails) { public void setDetails(String groupDetails) {
this.groupDetails = groupDetails; this.details = groupDetails;
} }
public User getGroupCreator() { public User getCreator() {
return groupCreator; return creator;
} }
public void setGroupCreator(User groupCreator) { public void setCreator(User groupCreator) {
this.groupCreator = groupCreator; this.creator = groupCreator;
} }
public List<GroupMembership> getGroupMembershipList() { public List<GroupMembership> getMembers() {
return groupMembershipList; return members;
} }
public void setGroupMembershipList(List<GroupMembership> groupMembershipList) { public void setMembers(List<GroupMembership> groupMembershipList) {
this.groupMembershipList = groupMembershipList; this.members = groupMembershipList;
} }
public List<Place> getPlaces() { public List<Place> getPlaces() {
...@@ -188,7 +187,7 @@ public class PlaceGroup implements ModelInterface { ...@@ -188,7 +187,7 @@ public class PlaceGroup implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.PlaceGroup[groupsId=" + getId() + "]"; return "fi.insomnia.bortal.model.PlaceGroup[id=" + getId() + "]";
} }
/** /**
......
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "groups")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PlaceGroup.java
@NamedQueries( {
@NamedQuery(name = "PlaceGroup.findAll", query = "SELECT p FROM PlaceGroup p"),
@NamedQuery(name = "PlaceGroup.findByGroupsId", query = "SELECT p FROM PlaceGroup p WHERE p.groupsId = :groupsId"),
@NamedQuery(name = "PlaceGroup.findByGroupCreated", query = "SELECT p FROM PlaceGroup p WHERE p.groupCreated = :groupCreated"),
@NamedQuery(name = "PlaceGroup.findByGroupEdited", query = "SELECT p FROM PlaceGroup p WHERE p.groupEdited = :groupEdited"),
@NamedQuery(name = "PlaceGroup.findByGroupCode", query = "SELECT p FROM PlaceGroup p WHERE p.groupCode = :groupCode"),
@NamedQuery(name = "PlaceGroup.findByGroupName", query = "SELECT p FROM PlaceGroup p WHERE p.groupName = :groupName"),
@NamedQuery(name = "PlaceGroup.findByGroupActive", query = "SELECT p FROM PlaceGroup p WHERE p.groupActive = :groupActive"),
@NamedQuery(name = "PlaceGroup.findByGroupDetails", query = "SELECT p FROM PlaceGroup p WHERE p.groupDetails = :groupDetails") })
public class PlaceGroup implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "PlaceGroup.findAll", query = "SELECT p FROM PlaceGroup p"),
@NamedQuery(name = "PlaceGroup.findByGroupsId", query = "SELECT p FROM PlaceGroup p WHERE p.groupsId = :groupsId"),
@NamedQuery(name = "PlaceGroup.findByGroupCreated", query = "SELECT p FROM PlaceGroup p WHERE p.groupCreated = :groupCreated"),
@NamedQuery(name = "PlaceGroup.findByGroupEdited", query = "SELECT p FROM PlaceGroup p WHERE p.groupEdited = :groupEdited"),
@NamedQuery(name = "PlaceGroup.findByGroupCode", query = "SELECT p FROM PlaceGroup p WHERE p.groupCode = :groupCode"),
@NamedQuery(name = "PlaceGroup.findByGroupName", query = "SELECT p FROM PlaceGroup p WHERE p.groupName = :groupName"),
@NamedQuery(name = "PlaceGroup.findByGroupActive", query = "SELECT p FROM PlaceGroup p WHERE p.groupActive = :groupActive"),
@NamedQuery(name = "PlaceGroup.findByGroupDetails", query = "SELECT p FROM PlaceGroup p WHERE p.groupDetails = :groupDetails")})
public class PlaceGroup implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PlaceGroup.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "groups_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PlaceGroup.java
private Integer groupsId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PlaceGroup.java
@Column(name = "group_created", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date groupCreated;
@Column(name = "group_edited", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date groupEdited;
@Column(name = "group_code", length = 2147483647)
private String groupCode;
@Column(name = "group_name", length = 2147483647)
private String groupName;
@Column(name = "group_active", nullable = false)
private boolean groupActive;
@Column(name = "group_details", length = 2147483647)
private String groupDetails;
@JoinColumn(name = "group_creator", referencedColumnName = "users_id")
@ManyToOne
private User groupCreator;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "groupsId")
private List<GroupMembership> groupMembershipList;
@OneToMany(mappedBy = "groupsId")
private List<Place> placeList;
@Version
@Column(nullable = false)
private int jpaVersionField;
public PlaceGroup() {
}
public PlaceGroup(Integer groupsId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PlaceGroup.java
this.groupsId = groupsId;
}
public PlaceGroup(Integer groupsId, Date groupCreated, Date groupEdited,
boolean groupActive) {
this.groupsId = groupsId;
this.groupCreated = groupCreated;
this.groupEdited = groupEdited;
this.groupActive = groupActive;
}
public Integer getGroupsId() {
return groupsId;
}
public void setGroupsId(Integer groupsId) {
this.groupsId = groupsId;
}
=======
this.id = groupsId;
}
public PlaceGroup(Integer groupsId, Date groupCreated, Date groupEdited, boolean groupActive) {
this.id = groupsId;
this.groupCreated = groupCreated;
this.groupEdited = groupEdited;
this.groupActive = groupActive;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PlaceGroup.java
public Date getGroupCreated() {
return groupCreated;
}
public void setGroupCreated(Date groupCreated) {
this.groupCreated = groupCreated;
}
public Date getGroupEdited() {
return groupEdited;
}
public void setGroupEdited(Date groupEdited) {
this.groupEdited = groupEdited;
}
public String getGroupCode() {
return groupCode;
}
public void setGroupCode(String groupCode) {
this.groupCode = groupCode;
}
public String getGroupName() {
return groupName;
}
public void setGroupName(String groupName) {
this.groupName = groupName;
}
public boolean getGroupActive() {
return groupActive;
}
public void setGroupActive(boolean groupActive) {
this.groupActive = groupActive;
}
public String getGroupDetails() {
return groupDetails;
}
public void setGroupDetails(String groupDetails) {
this.groupDetails = groupDetails;
}
public User getGroupCreator() {
return groupCreator;
}
public void setGroupCreator(User groupCreator) {
this.groupCreator = groupCreator;
}
public List<GroupMembership> getGroupMembershipList() {
return groupMembershipList;
}
public void setGroupMembershipList(List<GroupMembership> groupMembershipList) {
this.groupMembershipList = groupMembershipList;
}
public List<Place> getPlaceList() {
return placeList;
}
public void setPlaceList(List<Place> placeList) {
this.placeList = placeList;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PlaceGroup.java
int hash = 0;
hash += (groupsId != null ? groupsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PlaceGroup.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PlaceGroup.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof PlaceGroup)) {
return false;
}
PlaceGroup other = (PlaceGroup) object;
if ((this.groupsId == null && other.groupsId != null)
|| (this.groupsId != null && !this.groupsId
.equals(other.groupsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof PlaceGroup)) {
return false;
}
PlaceGroup other = (PlaceGroup) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PlaceGroup.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PlaceGroup.java
return "fi.insomnia.bortal.model.PlaceGroup[groupsId=" + groupsId + "]";
=======
return "fi.insomnia.bortal.model.PlaceGroup[groupsId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PlaceGroup.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
...@@ -24,17 +24,15 @@ import javax.persistence.Version; ...@@ -24,17 +24,15 @@ import javax.persistence.Version;
/** /**
* *
* @author jkj
*/ */
@Entity @Entity
@Table(name = "printed_cards") @Table(name = "printed_cards")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "PrintedCard.findAll", query = "SELECT p FROM PrintedCard p"), @NamedQuery(name = "PrintedCard.findAll", query = "SELECT p FROM PrintedCard p"),
@NamedQuery(name = "PrintedCard.findByPrintedCardsId", query = "SELECT p FROM PrintedCard p WHERE p.printedCardsId = :printedCardsId"), @NamedQuery(name = "PrintedCard.findById", query = "SELECT p FROM PrintedCard p WHERE p.id = :id"),
@NamedQuery(name = "PrintedCard.findByEventRolesTypesId", query = "SELECT p FROM PrintedCard p WHERE p.eventRolesTypesId = :eventRolesTypesId"),
@NamedQuery(name = "PrintedCard.findByPrintTime", query = "SELECT p FROM PrintedCard p WHERE p.printTime = :printTime"), @NamedQuery(name = "PrintedCard.findByPrintTime", query = "SELECT p FROM PrintedCard p WHERE p.printTime = :printTime"),
@NamedQuery(name = "PrintedCard.findByBarcode", query = "SELECT p FROM PrintedCard p WHERE p.barcode = :barcode"), @NamedQuery(name = "PrintedCard.findByBarcode", query = "SELECT p FROM PrintedCard p WHERE p.barcode = :barcode"),
@NamedQuery(name = "PrintedCard.findByCardEnabled", query = "SELECT p FROM PrintedCard p WHERE p.cardEnabled = :cardEnabled"), @NamedQuery(name = "PrintedCard.findByEnabled", query = "SELECT p FROM PrintedCard p WHERE p.enabled = :enabled"),
@NamedQuery(name = "PrintedCard.findByRfidUid", query = "SELECT p FROM PrintedCard p WHERE p.rfidUid = :rfidUid") }) @NamedQuery(name = "PrintedCard.findByRfidUid", query = "SELECT p FROM PrintedCard p WHERE p.rfidUid = :rfidUid") })
public class PrintedCard implements ModelInterface { public class PrintedCard implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -42,27 +40,33 @@ public class PrintedCard implements ModelInterface { ...@@ -42,27 +40,33 @@ public class PrintedCard implements ModelInterface {
@Column(name = "printed_cards_id", nullable = false) @Column(name = "printed_cards_id", nullable = false)
private Integer id; private Integer id;
@Column(name = "event_roles_types_id", nullable = false)
private int eventRolesTypesId;
@Column(name = "print_time", nullable = false) @Column(name = "print_time", nullable = false)
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
private Date printTime; private Date printTime;
@Column(name = "barcode") @Column(name = "barcode")
private String barcode; private String barcode;
@Column(name = "card_enabled", nullable = false) @Column(name = "card_enabled", nullable = false)
private boolean cardEnabled; private boolean enabled;
@Column(name = "rfid_uid") @Column(name = "rfid_uid")
private String rfidUid; private String rfidUid;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "printedCardsId")
private List<ReaderEvent> readerEventList; @OneToMany(cascade = CascadeType.ALL, mappedBy = "printedCard")
private List<ReaderEvent> readerEvents;
@JoinColumn(name = "current_location", referencedColumnName = "locations_id") @JoinColumn(name = "current_location", referencedColumnName = "locations_id")
@ManyToOne @ManyToOne
private Location currentLocation; private Location currentLocation;
@JoinColumn(name = "users_id", referencedColumnName = "users_id", nullable = false) @JoinColumn(name = "users_id", referencedColumnName = "users_id", nullable = false)
@ManyToOne(optional = false) @ManyToOne(optional = false)
private User usersId; private User user;
@JoinColumn(name = "card_templates_id", referencedColumnName = "card_templates_id", nullable = false)
@ManyToOne(optional = false)
private CardTemplate template;
@Version @Version
@Column(nullable = false) @Column(nullable = false)
...@@ -83,20 +87,11 @@ public class PrintedCard implements ModelInterface { ...@@ -83,20 +87,11 @@ public class PrintedCard implements ModelInterface {
this.id = printedCardsId; this.id = printedCardsId;
} }
public PrintedCard(Integer printedCardsId, int eventRolesTypesId, public PrintedCard(Integer printedCardsId, Date printTime,
Date printTime, boolean cardEnabled) { boolean cardEnabled) {
this.id = printedCardsId; this.id = printedCardsId;
this.eventRolesTypesId = eventRolesTypesId;
this.printTime = printTime; this.printTime = printTime;
this.cardEnabled = cardEnabled; this.enabled = cardEnabled;
}
public int getEventRolesTypesId() {
return eventRolesTypesId;
}
public void setEventRolesTypesId(int eventRolesTypesId) {
this.eventRolesTypesId = eventRolesTypesId;
} }
public Date getPrintTime() { public Date getPrintTime() {
...@@ -115,12 +110,12 @@ public class PrintedCard implements ModelInterface { ...@@ -115,12 +110,12 @@ public class PrintedCard implements ModelInterface {
this.barcode = barcode; this.barcode = barcode;
} }
public boolean getCardEnabled() { public boolean getEnabled() {
return cardEnabled; return enabled;
} }
public void setCardEnabled(boolean cardEnabled) { public void setEnabled(boolean cardEnabled) {
this.cardEnabled = cardEnabled; this.enabled = cardEnabled;
} }
public String getRfidUid() { public String getRfidUid() {
...@@ -131,12 +126,12 @@ public class PrintedCard implements ModelInterface { ...@@ -131,12 +126,12 @@ public class PrintedCard implements ModelInterface {
this.rfidUid = rfidUid; this.rfidUid = rfidUid;
} }
public List<ReaderEvent> getReaderEventList() { public List<ReaderEvent> getReaderEvents() {
return readerEventList; return readerEvents;
} }
public void setReaderEventList(List<ReaderEvent> readerEventList) { public void setReaderEvents(List<ReaderEvent> readerEventList) {
this.readerEventList = readerEventList; this.readerEvents = readerEventList;
} }
public Location getCurrentLocation() { public Location getCurrentLocation() {
...@@ -147,12 +142,12 @@ public class PrintedCard implements ModelInterface { ...@@ -147,12 +142,12 @@ public class PrintedCard implements ModelInterface {
this.currentLocation = currentLocation; this.currentLocation = currentLocation;
} }
public User getUsersId() { public User getUser() {
return usersId; return user;
} }
public void setUsersId(User usersId) { public void setUser(User usersId) {
this.usersId = usersId; this.user = usersId;
} }
@Override @Override
...@@ -179,8 +174,7 @@ public class PrintedCard implements ModelInterface { ...@@ -179,8 +174,7 @@ public class PrintedCard implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.PrintedCard[printedCardsId=" + id return "fi.insomnia.bortal.model.PrintedCard[id=" + id + "]";
+ "]";
} }
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
...@@ -191,4 +185,12 @@ public class PrintedCard implements ModelInterface { ...@@ -191,4 +185,12 @@ public class PrintedCard implements ModelInterface {
return jpaVersionField; return jpaVersionField;
} }
public void setTemplate(CardTemplate template) {
this.template = template;
}
public CardTemplate getTemplate() {
return template;
}
} }
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
*
* @author jkj
*/
@Entity
@Table(name = "printed_cards")
@NamedQueries( {
@NamedQuery(name = "PrintedCard.findAll", query = "SELECT p FROM PrintedCard p"),
@NamedQuery(name = "PrintedCard.findByPrintedCardsId", query = "SELECT p FROM PrintedCard p WHERE p.printedCardsId = :printedCardsId"),
@NamedQuery(name = "PrintedCard.findByEventRolesTypesId", query = "SELECT p FROM PrintedCard p WHERE p.eventRolesTypesId = :eventRolesTypesId"),
@NamedQuery(name = "PrintedCard.findByPrintTime", query = "SELECT p FROM PrintedCard p WHERE p.printTime = :printTime"),
@NamedQuery(name = "PrintedCard.findByBarcode", query = "SELECT p FROM PrintedCard p WHERE p.barcode = :barcode"),
@NamedQuery(name = "PrintedCard.findByCardEnabled", query = "SELECT p FROM PrintedCard p WHERE p.cardEnabled = :cardEnabled"),
@NamedQuery(name = "PrintedCard.findByRfidUid", query = "SELECT p FROM PrintedCard p WHERE p.rfidUid = :rfidUid") })
public class PrintedCard implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "printed_cards_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PrintedCard.java
private Integer printedCardsId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PrintedCard.java
@Column(name = "event_roles_types_id", nullable = false)
private int eventRolesTypesId;
@Column(name = "print_time", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date printTime;
@Column(name = "barcode", length = 2147483647)
private String barcode;
@Column(name = "card_enabled", nullable = false)
private boolean cardEnabled;
@Column(name = "rfid_uid", length = 2147483647)
private String rfidUid;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "printedCardsId")
private List<ReaderEvent> readerEventList;
@JoinColumn(name = "current_location", referencedColumnName = "locations_id")
@ManyToOne
private Location currentLocation;
@JoinColumn(name = "users_id", referencedColumnName = "users_id", nullable = false)
@ManyToOne(optional = false)
private User usersId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public PrintedCard() {
}
public PrintedCard(Integer printedCardsId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PrintedCard.java
this.printedCardsId = printedCardsId;
}
public PrintedCard(Integer printedCardsId, int eventRolesTypesId,
Date printTime, boolean cardEnabled) {
this.printedCardsId = printedCardsId;
this.eventRolesTypesId = eventRolesTypesId;
this.printTime = printTime;
this.cardEnabled = cardEnabled;
}
public Integer getPrintedCardsId() {
return printedCardsId;
}
public void setPrintedCardsId(Integer printedCardsId) {
this.printedCardsId = printedCardsId;
}
=======
this.id = printedCardsId;
}
public PrintedCard(Integer printedCardsId, int eventRolesTypesId, Date printTime, boolean cardEnabled) {
this.id = printedCardsId;
this.eventRolesTypesId = eventRolesTypesId;
this.printTime = printTime;
this.cardEnabled = cardEnabled;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PrintedCard.java
public int getEventRolesTypesId() {
return eventRolesTypesId;
}
public void setEventRolesTypesId(int eventRolesTypesId) {
this.eventRolesTypesId = eventRolesTypesId;
}
public Date getPrintTime() {
return printTime;
}
public void setPrintTime(Date printTime) {
this.printTime = printTime;
}
public String getBarcode() {
return barcode;
}
public void setBarcode(String barcode) {
this.barcode = barcode;
}
public boolean getCardEnabled() {
return cardEnabled;
}
public void setCardEnabled(boolean cardEnabled) {
this.cardEnabled = cardEnabled;
}
public String getRfidUid() {
return rfidUid;
}
public void setRfidUid(String rfidUid) {
this.rfidUid = rfidUid;
}
public List<ReaderEvent> getReaderEventList() {
return readerEventList;
}
public void setReaderEventList(List<ReaderEvent> readerEventList) {
this.readerEventList = readerEventList;
}
public Location getCurrentLocation() {
return currentLocation;
}
public void setCurrentLocation(Location currentLocation) {
this.currentLocation = currentLocation;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PrintedCard.java
int hash = 0;
hash += (printedCardsId != null ? printedCardsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PrintedCard.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PrintedCard.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof PrintedCard)) {
return false;
}
PrintedCard other = (PrintedCard) object;
if ((this.printedCardsId == null && other.printedCardsId != null)
|| (this.printedCardsId != null && !this.printedCardsId
.equals(other.printedCardsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof PrintedCard)) {
return false;
}
PrintedCard other = (PrintedCard) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PrintedCard.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PrintedCard.java
return "fi.insomnia.bortal.model.PrintedCard[printedCardsId="
+ printedCardsId + "]";
=======
return "fi.insomnia.bortal.model.PrintedCard[printedCardsId=" + id + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/PrintedCard.java
}
}
...@@ -22,7 +22,6 @@ import javax.persistence.Version; ...@@ -22,7 +22,6 @@ import javax.persistence.Version;
/** /**
* *
* @author jkj
*/ */
@Entity @Entity
@Table(name = "products") @Table(name = "products")
...@@ -53,11 +52,11 @@ public class Product implements ModelInterface { ...@@ -53,11 +52,11 @@ public class Product implements ModelInterface {
@Column(name = "barcode") @Column(name = "barcode")
private String barcode; private String barcode;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "productsId") @OneToMany(cascade = CascadeType.ALL, mappedBy = "product")
private List<Place> placeList; private List<Place> places;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "productsId") @OneToMany(cascade = CascadeType.ALL, mappedBy = "product")
private List<AccountEvent> accountEventList; private List<AccountEvent> accountEvents;
@JoinTable(name = "food_wave_templates_products", joinColumns = { @JoinColumn(name = "products_id", referencedColumnName = "products_id") }, inverseJoinColumns = { @JoinColumn(name = "food_wave_templates_id", referencedColumnName = "food_wave_templates_id") }) @JoinTable(name = "food_wave_templates_products", joinColumns = { @JoinColumn(name = "products_id", referencedColumnName = "products_id") }, inverseJoinColumns = { @JoinColumn(name = "food_wave_templates_id", referencedColumnName = "food_wave_templates_id") })
@ManyToMany @ManyToMany
...@@ -115,20 +114,20 @@ public class Product implements ModelInterface { ...@@ -115,20 +114,20 @@ public class Product implements ModelInterface {
this.barcode = barcode; this.barcode = barcode;
} }
public List<Place> getPlaceList() { public List<Place> getPlaces() {
return placeList; return places;
} }
public void setPlaceList(List<Place> placeList) { public void setPlaces(List<Place> placeList) {
this.placeList = placeList; this.places = placeList;
} }
public List<AccountEvent> getAccountEventList() { public List<AccountEvent> getAccountEvents() {
return accountEventList; return accountEvents;
} }
public void setAccountEventList(List<AccountEvent> accountEventList) { public void setAccountEvents(List<AccountEvent> accountEventList) {
this.accountEventList = accountEventList; this.accountEvents = accountEventList;
} }
@Override @Override
......
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "products")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
@NamedQueries( {
@NamedQuery(name = "Product.findAll", query = "SELECT p FROM Product p"),
@NamedQuery(name = "Product.findByProductsId", query = "SELECT p FROM Product p WHERE p.productsId = :productsId"),
@NamedQuery(name = "Product.findByProductName", query = "SELECT p FROM Product p WHERE p.productName = :productName"),
@NamedQuery(name = "Product.findByPrice", query = "SELECT p FROM Product p WHERE p.price = :price"),
@NamedQuery(name = "Product.findBySort", query = "SELECT p FROM Product p WHERE p.sort = :sort"),
@NamedQuery(name = "Product.findByBarcode", query = "SELECT p FROM Product p WHERE p.barcode = :barcode") })
public class Product implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "products_id", nullable = false)
private Integer productsId;
@Column(name = "product_name", length = 2147483647)
private String productName;
@Column(name = "price", nullable = false)
private BigInteger price;
=======
@NamedQueries({
@NamedQuery(name = "Product.findAll", query = "SELECT p FROM Product p"),
@NamedQuery(name = "Product.findByProductsId", query = "SELECT p FROM Product p WHERE p.productsId = :productsId"),
@NamedQuery(name = "Product.findByProductName", query = "SELECT p FROM Product p WHERE p.productName = :productName"),
@NamedQuery(name = "Product.findByPrice", query = "SELECT p FROM Product p WHERE p.price = :price"),
@NamedQuery(name = "Product.findBySort", query = "SELECT p FROM Product p WHERE p.sort = :sort"),
@NamedQuery(name = "Product.findByBarcode", query = "SELECT p FROM Product p WHERE p.barcode = :barcode")})
public class Product implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "products_id", nullable = false)
private Integer id;
@Column(name = "product_name", length = 2147483647)
private String productName;
@Basic(optional = false)
@Column(name = "price", nullable = false)
private BigInteger price;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
@Column(name = "sort", nullable = false)
private int sort;
@Column(name = "barcode", length = 2147483647)
private String barcode;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "productsId")
private List<Place> placeList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "productsId")
private List<AccountEvent> accountEventList;
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
@JoinTable(name = "food_wave_templates_products", joinColumns = { @JoinColumn(name = "products_id", referencedColumnName = "products_id") }, inverseJoinColumns = { @JoinColumn(name = "food_wave_templates_id", referencedColumnName = "food_wave_templates_id") })
@ManyToMany
private List<FoodWaveTemplate> foodWaveTemplate;
=======
@JoinTable(name = "food_wave_templates_products", joinColumns = {
@JoinColumn(name = "products_id", referencedColumnName = "products_id")}, inverseJoinColumns = {
@JoinColumn(name = "food_wave_templates_id", referencedColumnName = "food_wave_templates_id")})
@ManyToMany
private List<FoodWaveTemplate> foodWaveTemplate;
@Version
@Column(nullable = false)
private int jpaVersionField;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
public Product() {
}
public Product(Integer productsId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
this.productsId = productsId;
}
public Product(Integer productsId, BigInteger price, int sort) {
this.productsId = productsId;
this.price = price;
this.sort = sort;
}
public Integer getProductsId() {
return productsId;
}
public void setProductsId(Integer productsId) {
this.productsId = productsId;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public BigInteger getPrice() {
return price;
}
public void setPrice(BigInteger price) {
this.price = price;
}
public int getSort() {
return sort;
}
public void setSort(int sort) {
this.sort = sort;
}
public String getBarcode() {
return barcode;
}
public void setBarcode(String barcode) {
this.barcode = barcode;
}
public List<Place> getPlaceList() {
return placeList;
}
public void setPlaceList(List<Place> placeList) {
this.placeList = placeList;
}
public List<AccountEvent> getAccountEventList() {
return accountEventList;
}
public void setAccountEventList(List<AccountEvent> accountEventList) {
this.accountEventList = accountEventList;
=======
this.id = productsId;
}
public Product(Integer productsId, BigInteger price, int sort) {
this.id = productsId;
this.price = price;
this.sort = sort;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public BigInteger getPrice() {
return price;
}
public void setPrice(BigInteger price) {
this.price = price;
}
public int getSort() {
return sort;
}
public void setSort(int sort) {
this.sort = sort;
}
public String getBarcode() {
return barcode;
}
public void setBarcode(String barcode) {
this.barcode = barcode;
}
public List<Place> getPlaceList() {
return placeList;
}
public void setPlaceList(List<Place> placeList) {
this.placeList = placeList;
}
public List<AccountEvent> getAccountEventList() {
return accountEventList;
}
public void setAccountEventList(List<AccountEvent> accountEventList) {
this.accountEventList = accountEventList;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
int hash = 0;
hash += (productsId != null ? productsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Product)) {
return false;
}
Product other = (Product) object;
if ((this.productsId == null && other.productsId != null)
|| (this.productsId != null && !this.productsId
.equals(other.productsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Product)) {
return false;
}
Product other = (Product) object;
if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
return "fi.insomnia.bortal.model.Product[productsId=" + productsId
+ "]";
=======
return "fi.insomnia.bortal.model.Product[productsId=" + getId()
+ "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
}
/**
* @return the foodWaveTemplate
*/
public List<FoodWaveTemplate> getFoodWaveTemplate() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
return foodWaveTemplate;
=======
return foodWaveTemplate;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
}
/**
* @param foodWaveTemplate
* the foodWaveTemplate to set
*/
public void setFoodWaveTemplate(List<FoodWaveTemplate> foodWaveTemplate) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
this.foodWaveTemplate = foodWaveTemplate;
}
=======
this.foodWaveTemplate = foodWaveTemplate;
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "readers")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Reader.java
@NamedQueries( {
@NamedQuery(name = "Reader.findAll", query = "SELECT r FROM Reader r"),
@NamedQuery(name = "Reader.findByReadersId", query = "SELECT r FROM Reader r WHERE r.readersId = :readersId"),
@NamedQuery(name = "Reader.findByReaderId", query = "SELECT r FROM Reader r WHERE r.readerId = :readerId"),
@NamedQuery(name = "Reader.findByReaderDescription", query = "SELECT r FROM Reader r WHERE r.readerDescription = :readerDescription") })
public class Reader implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "Reader.findAll", query = "SELECT r FROM Reader r"),
@NamedQuery(name = "Reader.findByReadersId", query = "SELECT r FROM Reader r WHERE r.readersId = :readersId"),
@NamedQuery(name = "Reader.findByReaderId", query = "SELECT r FROM Reader r WHERE r.readerId = :readerId"),
@NamedQuery(name = "Reader.findByReaderDescription", query = "SELECT r FROM Reader r WHERE r.readerDescription = :readerDescription")})
public class Reader implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Reader.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "readers_id", nullable = false)
private Integer id;
@Column(name = "reader_id", length = 2147483647)
private String readerId;
@Column(name = "reader_description", length = 2147483647)
private String readerDescription;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "readersId")
private List<ReaderEvent> readerEventList;
@JoinColumn(name = "locations_id", referencedColumnName = "locations_id")
@ManyToOne
private Location locationsId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public Reader() {
}
public Reader(Integer readersId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Reader.java
this.readersId = readersId;
}
public Integer getReadersId() {
return readersId;
}
public void setReadersId(Integer readersId) {
this.readersId = readersId;
=======
this.id = readersId;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Reader.java
}
public String getReaderId() {
return readerId;
}
public void setReaderId(String readerId) {
this.readerId = readerId;
}
public String getReaderDescription() {
return readerDescription;
}
public void setReaderDescription(String readerDescription) {
this.readerDescription = readerDescription;
}
public List<ReaderEvent> getReaderEventList() {
return readerEventList;
}
public void setReaderEventList(List<ReaderEvent> readerEventList) {
this.readerEventList = readerEventList;
}
public Location getLocationsId() {
return locationsId;
}
public void setLocationsId(Location locationsId) {
this.locationsId = locationsId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Reader.java
int hash = 0;
hash += (readersId != null ? readersId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Reader.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Reader.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Reader)) {
return false;
}
Reader other = (Reader) object;
if ((this.readersId == null && other.readersId != null)
|| (this.readersId != null && !this.readersId
.equals(other.readersId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Reader)) {
return false;
}
Reader other = (Reader) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Reader.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Reader.java
return "fi.insomnia.bortal.model.Reader[readersId=" + readersId + "]";
=======
return "fi.insomnia.bortal.model.Reader[readersId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Reader.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "reader_events")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/ReaderEvent.java
@NamedQueries( {
@NamedQuery(name = "ReaderEvent.findAll", query = "SELECT r FROM ReaderEvent r"),
@NamedQuery(name = "ReaderEvent.findByReaderEventsId", query = "SELECT r FROM ReaderEvent r WHERE r.readerEventsId = :readerEventsId"),
@NamedQuery(name = "ReaderEvent.findByEventTime", query = "SELECT r FROM ReaderEvent r WHERE r.eventTime = :eventTime"),
@NamedQuery(name = "ReaderEvent.findByValue", query = "SELECT r FROM ReaderEvent r WHERE r.value = :value") })
public class ReaderEvent implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "ReaderEvent.findAll", query = "SELECT r FROM ReaderEvent r"),
@NamedQuery(name = "ReaderEvent.findByReaderEventsId", query = "SELECT r FROM ReaderEvent r WHERE r.readerEventsId = :readerEventsId"),
@NamedQuery(name = "ReaderEvent.findByEventTime", query = "SELECT r FROM ReaderEvent r WHERE r.eventTime = :eventTime"),
@NamedQuery(name = "ReaderEvent.findByValue", query = "SELECT r FROM ReaderEvent r WHERE r.value = :value")})
public class ReaderEvent implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/ReaderEvent.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "reader_events_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/ReaderEvent.java
private Integer readerEventsId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/ReaderEvent.java
@Column(name = "event_time", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date eventTime;
@Column(name = "value", length = 2147483647)
private String value;
@JoinColumn(name = "printed_cards_id", referencedColumnName = "printed_cards_id", nullable = false)
@ManyToOne(optional = false)
private PrintedCard printedCardsId;
@JoinColumn(name = "readers_id", referencedColumnName = "readers_id", nullable = false)
@ManyToOne(optional = false)
private Reader readersId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public ReaderEvent() {
}
public ReaderEvent(Integer readerEventsId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/ReaderEvent.java
this.readerEventsId = readerEventsId;
}
public ReaderEvent(Integer readerEventsId, Date eventTime) {
this.readerEventsId = readerEventsId;
this.eventTime = eventTime;
}
public Integer getReaderEventsId() {
return readerEventsId;
}
public void setReaderEventsId(Integer readerEventsId) {
this.readerEventsId = readerEventsId;
}
=======
this.id = readerEventsId;
}
public ReaderEvent(Integer readerEventsId, Date eventTime) {
this.id = readerEventsId;
this.eventTime = eventTime;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/ReaderEvent.java
public Date getEventTime() {
return eventTime;
}
public void setEventTime(Date eventTime) {
this.eventTime = eventTime;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public PrintedCard getPrintedCardsId() {
return printedCardsId;
}
public void setPrintedCardsId(PrintedCard printedCardsId) {
this.printedCardsId = printedCardsId;
}
public Reader getReadersId() {
return readersId;
}
public void setReadersId(Reader readersId) {
this.readersId = readersId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/ReaderEvent.java
int hash = 0;
hash += (readerEventsId != null ? readerEventsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/ReaderEvent.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/ReaderEvent.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof ReaderEvent)) {
return false;
}
ReaderEvent other = (ReaderEvent) object;
if ((this.readerEventsId == null && other.readerEventsId != null)
|| (this.readerEventsId != null && !this.readerEventsId
.equals(other.readerEventsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof ReaderEvent)) {
return false;
}
ReaderEvent other = (ReaderEvent) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/ReaderEvent.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/ReaderEvent.java
return "fi.insomnia.bortal.model.ReaderEvent[readerEventsId="
+ readerEventsId + "]";
=======
return "fi.insomnia.bortal.model.ReaderEvent[readerEventsId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/ReaderEvent.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
...@@ -21,7 +21,6 @@ import javax.persistence.Version; ...@@ -21,7 +21,6 @@ import javax.persistence.Version;
/** /**
* *
* @author jkj
*/ */
@Entity @Entity
@Table(name = "roles") @Table(name = "roles")
...@@ -54,7 +53,7 @@ public class Role implements ModelInterface { ...@@ -54,7 +53,7 @@ public class Role implements ModelInterface {
@JoinColumn(name = "card_templates_id", referencedColumnName = "card_templates_id") @JoinColumn(name = "card_templates_id", referencedColumnName = "card_templates_id")
@ManyToOne @ManyToOne
private CardTemplate cardTemplatesId; private CardTemplate cardTemplate;
@JoinColumn(name = "events_id", referencedColumnName = "events_id", nullable = false) @JoinColumn(name = "events_id", referencedColumnName = "events_id", nullable = false)
@ManyToOne(optional = false) @ManyToOne(optional = false)
...@@ -112,12 +111,12 @@ public class Role implements ModelInterface { ...@@ -112,12 +111,12 @@ public class Role implements ModelInterface {
this.roleRightList = roleRightList; this.roleRightList = roleRightList;
} }
public CardTemplate getCardTemplatesId() { public CardTemplate getCardTemplate() {
return cardTemplatesId; return cardTemplate;
} }
public void setCardTemplatesId(CardTemplate cardTemplatesId) { public void setCardTemplate(CardTemplate cardTemplatesId) {
this.cardTemplatesId = cardTemplatesId; this.cardTemplate = cardTemplatesId;
} }
public Event getEventsId() { public Event getEventsId() {
......
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "roles")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
@NamedQueries( {
@NamedQuery(name = "Role.findAll", query = "SELECT r FROM Role r"),
@NamedQuery(name = "Role.findByRolesId", query = "SELECT r FROM Role r WHERE r.rolesId = :rolesId"),
@NamedQuery(name = "Role.findByRoleName", query = "SELECT r FROM Role r WHERE r.roleName = :roleName") })
public class Role implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "Role.findAll", query = "SELECT r FROM Role r"),
@NamedQuery(name = "Role.findByRolesId", query = "SELECT r FROM Role r WHERE r.rolesId = :rolesId"),
@NamedQuery(name = "Role.findByRoleName", query = "SELECT r FROM Role r WHERE r.roleName = :roleName")})
public class Role implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "roles_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
private Integer rolesId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
@Column(name = "role_name", nullable = false, length = 2147483647)
private String roleName;
@OneToMany(mappedBy = "defaultRole")
private List<Event> eventList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "rolesId")
private List<RoleMembership> roleMembershipList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "rolesId")
private List<RoleInheritance> roleInheritanceList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "inherits")
private List<RoleInheritance> roleInheritanceList1;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "rolesId")
private List<RoleRight> roleRightList;
@JoinColumn(name = "card_templates_id", referencedColumnName = "card_templates_id")
@ManyToOne
private CardTemplate cardTemplatesId;
@JoinColumn(name = "events_id", referencedColumnName = "events_id", nullable = false)
@ManyToOne(optional = false)
private Event eventsId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public Role() {
}
public Role(Integer rolesId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
this.rolesId = rolesId;
}
public Role(Integer rolesId, String roleName) {
this.rolesId = rolesId;
this.roleName = roleName;
}
public Integer getRolesId() {
return rolesId;
}
public void setRolesId(Integer rolesId) {
this.rolesId = rolesId;
}
=======
this.id = rolesId;
}
public Role(Integer rolesId, String roleName) {
this.id = rolesId;
this.roleName = roleName;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public List<Event> getEventList() {
return eventList;
}
public void setEventList(List<Event> eventList) {
this.eventList = eventList;
}
public List<RoleMembership> getRoleMembershipList() {
return roleMembershipList;
}
public void setRoleMembershipList(List<RoleMembership> roleMembershipList) {
this.roleMembershipList = roleMembershipList;
}
public List<RoleInheritance> getRoleInheritanceList() {
return roleInheritanceList;
}
public void setRoleInheritanceList(List<RoleInheritance> roleInheritanceList) {
this.roleInheritanceList = roleInheritanceList;
}
public List<RoleInheritance> getRoleInheritanceList1() {
return roleInheritanceList1;
}
public void setRoleInheritanceList1(
List<RoleInheritance> roleInheritanceList1) {
this.roleInheritanceList1 = roleInheritanceList1;
}
public List<RoleRight> getRoleRightList() {
return roleRightList;
}
public void setRoleRightList(List<RoleRight> roleRightList) {
this.roleRightList = roleRightList;
}
public CardTemplate getCardTemplatesId() {
return cardTemplatesId;
}
public void setCardTemplatesId(CardTemplate cardTemplatesId) {
this.cardTemplatesId = cardTemplatesId;
}
public Event getEventsId() {
return eventsId;
}
public void setEventsId(Event eventsId) {
this.eventsId = eventsId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
int hash = 0;
hash += (rolesId != null ? rolesId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Role)) {
return false;
}
Role other = (Role) object;
if ((this.rolesId == null && other.rolesId != null)
|| (this.rolesId != null && !this.rolesId.equals(other.rolesId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Role)) {
return false;
}
Role other = (Role) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
return "fi.insomnia.bortal.model.Role[rolesId=" + rolesId + "]";
=======
return "fi.insomnia.bortal.model.Role[rolesId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleInheritance.java
@Table(name = "role_inheritance", uniqueConstraints = { @UniqueConstraint(columnNames = {
"roles_id", "inherits" }) })
@NamedQueries( {
@NamedQuery(name = "RoleInheritance.findAll", query = "SELECT r FROM RoleInheritance r"),
@NamedQuery(name = "RoleInheritance.findByRoleInheritanceId", query = "SELECT r FROM RoleInheritance r WHERE r.roleInheritanceId = :roleInheritanceId") })
public class RoleInheritance implements Serializable {
=======
@Table(name = "role_inheritance", uniqueConstraints = {
@UniqueConstraint(columnNames = {"roles_id", "inherits"})})
@NamedQueries({
@NamedQuery(name = "RoleInheritance.findAll", query = "SELECT r FROM RoleInheritance r"),
@NamedQuery(name = "RoleInheritance.findByRoleInheritanceId", query = "SELECT r FROM RoleInheritance r WHERE r.roleInheritanceId = :roleInheritanceId")})
public class RoleInheritance implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleInheritance.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "role_inheritance_id", nullable = false)
private Integer id;
@JoinColumn(name = "roles_id", referencedColumnName = "roles_id", nullable = false)
@ManyToOne(optional = false)
private Role rolesId;
@JoinColumn(name = "inherits", referencedColumnName = "roles_id", nullable = false)
@ManyToOne(optional = false)
private Role inherits;
@Version
@Column(nullable = false)
private int jpaVersionField;
public RoleInheritance() {
}
public RoleInheritance(Integer roleInheritanceId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleInheritance.java
this.roleInheritanceId = roleInheritanceId;
}
public Integer getRoleInheritanceId() {
return roleInheritanceId;
}
public void setRoleInheritanceId(Integer roleInheritanceId) {
this.roleInheritanceId = roleInheritanceId;
=======
this.id = roleInheritanceId;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleInheritance.java
}
public Role getRolesId() {
return rolesId;
}
public void setRolesId(Role rolesId) {
this.rolesId = rolesId;
}
public Role getInherits() {
return inherits;
}
public void setInherits(Role inherits) {
this.inherits = inherits;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleInheritance.java
int hash = 0;
hash += (roleInheritanceId != null ? roleInheritanceId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleInheritance.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleInheritance.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof RoleInheritance)) {
return false;
}
RoleInheritance other = (RoleInheritance) object;
if ((this.roleInheritanceId == null && other.roleInheritanceId != null)
|| (this.roleInheritanceId != null && !this.roleInheritanceId
.equals(other.roleInheritanceId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof RoleInheritance)) {
return false;
}
RoleInheritance other = (RoleInheritance) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleInheritance.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleInheritance.java
return "fi.insomnia.bortal.model.RoleInheritance[roleInheritanceId="
+ roleInheritanceId + "]";
=======
return "fi.insomnia.bortal.model.RoleInheritance[roleInheritanceId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleInheritance.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleMembership.java
@Table(name = "role_memberships", uniqueConstraints = { @UniqueConstraint(columnNames = {
"roles_id", "users_id" }) })
@NamedQueries( {
@NamedQuery(name = "RoleMembership.findAll", query = "SELECT r FROM RoleMembership r"),
@NamedQuery(name = "RoleMembership.findByRoleMembershipsId", query = "SELECT r FROM RoleMembership r WHERE r.roleMembershipsId = :roleMembershipsId") })
public class RoleMembership implements Serializable {
=======
@Table(name = "role_memberships", uniqueConstraints = {
@UniqueConstraint(columnNames = {"roles_id", "users_id"})})
@NamedQueries({
@NamedQuery(name = "RoleMembership.findAll", query = "SELECT r FROM RoleMembership r"),
@NamedQuery(name = "RoleMembership.findByRoleMembershipsId", query = "SELECT r FROM RoleMembership r WHERE r.roleMembershipsId = :roleMembershipsId")})
public class RoleMembership implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleMembership.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "role_memberships_id", nullable = false)
private Integer id;
@JoinColumn(name = "roles_id", referencedColumnName = "roles_id", nullable = false)
@ManyToOne(optional = false)
private Role rolesId;
@JoinColumn(name = "users_id", referencedColumnName = "users_id", nullable = false)
@ManyToOne(optional = false)
private User usersId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public RoleMembership() {
}
public RoleMembership(Integer roleMembershipsId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleMembership.java
this.roleMembershipsId = roleMembershipsId;
}
public Integer getRoleMembershipsId() {
return roleMembershipsId;
}
public void setRoleMembershipsId(Integer roleMembershipsId) {
this.roleMembershipsId = roleMembershipsId;
=======
this.id = roleMembershipsId;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleMembership.java
}
public Role getRolesId() {
return rolesId;
}
public void setRolesId(Role rolesId) {
this.rolesId = rolesId;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleMembership.java
int hash = 0;
hash += (roleMembershipsId != null ? roleMembershipsId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleMembership.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleMembership.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof RoleMembership)) {
return false;
}
RoleMembership other = (RoleMembership) object;
if ((this.roleMembershipsId == null && other.roleMembershipsId != null)
|| (this.roleMembershipsId != null && !this.roleMembershipsId
.equals(other.roleMembershipsId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof RoleMembership)) {
return false;
}
RoleMembership other = (RoleMembership) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleMembership.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleMembership.java
return "fi.insomnia.bortal.model.RoleMembership[roleMembershipsId="
+ roleMembershipsId + "]";
=======
return "fi.insomnia.bortal.model.RoleMembership[roleMembershipsId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleMembership.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "role_rights")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleRight.java
@NamedQueries( {
@NamedQuery(name = "RoleRight.findAll", query = "SELECT r FROM RoleRight r"),
@NamedQuery(name = "RoleRight.findByRoleRights", query = "SELECT r FROM RoleRight r WHERE r.roleRights = :roleRights"),
@NamedQuery(name = "RoleRight.findByRead", query = "SELECT r FROM RoleRight r WHERE r.read = :read"),
@NamedQuery(name = "RoleRight.findByWrite", query = "SELECT r FROM RoleRight r WHERE r.write = :write") })
public class RoleRight implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "role_rights", nullable = false)
private Integer roleRights;
=======
@NamedQueries({
@NamedQuery(name = "RoleRight.findAll", query = "SELECT r FROM RoleRight r"),
@NamedQuery(name = "RoleRight.findByRoleRights", query = "SELECT r FROM RoleRight r WHERE r.roleRights = :roleRights"),
@NamedQuery(name = "RoleRight.findByRead", query = "SELECT r FROM RoleRight r WHERE r.read = :read"),
@NamedQuery(name = "RoleRight.findByWrite", query = "SELECT r FROM RoleRight r WHERE r.write = :write")})
public class RoleRight implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "role_rights_id", nullable = false)
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleRight.java
@Column(name = "read", nullable = false)
private boolean read;
@Column(name = "write", nullable = false)
private boolean write;
//TODO: add execute
@JoinColumn(name = "access_rights_id", referencedColumnName = "access_rights_id")
@ManyToOne
private AccessRight accessRightsId;
@JoinColumn(name = "roles_id", referencedColumnName = "roles_id", nullable = false)
@ManyToOne(optional = false)
private Role rolesId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public RoleRight() {
}
public RoleRight(Integer roleRights) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleRight.java
this.roleRights = roleRights;
}
public RoleRight(Integer roleRights, boolean read, boolean write) {
this.roleRights = roleRights;
this.read = read;
this.write = write;
}
public Integer getRoleRights() {
return roleRights;
}
public void setRoleRights(Integer roleRights) {
this.roleRights = roleRights;
}
=======
this.id = roleRights;
}
public RoleRight(Integer roleRights, boolean read, boolean write) {
this.id = roleRights;
this.read = read;
this.write = write;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleRight.java
public boolean getRead() {
return read;
}
public void setRead(boolean read) {
this.read = read;
}
public boolean getWrite() {
return write;
}
public void setWrite(boolean write) {
this.write = write;
}
public AccessRight getAccessRightsId() {
return accessRightsId;
}
public void setAccessRightsId(AccessRight accessRightsId) {
this.accessRightsId = accessRightsId;
}
public Role getRolesId() {
return rolesId;
}
public void setRolesId(Role rolesId) {
this.rolesId = rolesId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleRight.java
int hash = 0;
hash += (roleRights != null ? roleRights.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleRight.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleRight.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof RoleRight)) {
return false;
}
RoleRight other = (RoleRight) object;
if ((this.roleRights == null && other.roleRights != null)
|| (this.roleRights != null && !this.roleRights
.equals(other.roleRights))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof RoleRight)) {
return false;
}
RoleRight other = (RoleRight) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleRight.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleRight.java
return "fi.insomnia.bortal.model.RoleRight[roleRights=" + roleRights
+ "]";
=======
return "fi.insomnia.bortal.model.RoleRight[roleRights=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleRight.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
...@@ -22,7 +22,6 @@ import javax.persistence.Version; ...@@ -22,7 +22,6 @@ import javax.persistence.Version;
/** /**
* *
* @author jkj
*/ */
@Entity @Entity
@Table(name = "users") @Table(name = "users")
...@@ -101,16 +100,24 @@ public class User implements ModelInterface { ...@@ -101,16 +100,24 @@ public class User implements ModelInterface {
@OneToMany(mappedBy = "user") @OneToMany(mappedBy = "user")
private List<GroupMembership> groupMemberships; private List<GroupMembership> groupMemberships;
@OneToMany(mappedBy = "usersId") /**
private List<Place> placeList; * The places this user has registered into.
*/
@OneToMany(mappedBy = "currentUser")
private List<Place> currentPlaces;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "user") @OneToMany(cascade = CascadeType.ALL, mappedBy = "user")
private List<PrintedCard> printedCardList; private List<PrintedCard> printedCardList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "user") @OneToMany(cascade = CascadeType.ALL, mappedBy = "user")
private List<AccountEvent> accountEventList; private List<AccountEvent> accountEventList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "user") @OneToMany(cascade = CascadeType.ALL, mappedBy = "user")
private List<DiscountInstance> discountInstanceList; private List<DiscountInstance> discountInstanceList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "user") @OneToMany(cascade = CascadeType.ALL, mappedBy = "user")
private List<Bill> billList; private List<Bill> billList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "seller") @OneToMany(cascade = CascadeType.ALL, mappedBy = "seller")
private List<AccountEvent> soldItems; private List<AccountEvent> soldItems;
@Version @Version
...@@ -318,12 +325,12 @@ public class User implements ModelInterface { ...@@ -318,12 +325,12 @@ public class User implements ModelInterface {
this.groupMemberships = groupMembershipList; this.groupMemberships = groupMembershipList;
} }
public List<Place> getPlaceList() { public List<Place> getCurrentPlaces() {
return placeList; return currentPlaces;
} }
public void setPlaceList(List<Place> placeList) { public void setCurrentPlaces(List<Place> placeList) {
this.placeList = placeList; this.currentPlaces = placeList;
} }
public List<PrintedCard> getPrintedCardList() { public List<PrintedCard> getPrintedCardList() {
......
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "users")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/User.java
@NamedQueries( {
@NamedQuery(name = "User.findAll", query = "SELECT u FROM User u"),
@NamedQuery(name = "User.findByUsersId", query = "SELECT u FROM User u WHERE u.usersId = :usersId"),
@NamedQuery(name = "User.findByCreated", query = "SELECT u FROM User u WHERE u.created = :created"),
@NamedQuery(name = "User.findByActive", query = "SELECT u FROM User u WHERE u.active = :active"),
@NamedQuery(name = "User.findByPassword", query = "SELECT u FROM User u WHERE u.password = :password"),
@NamedQuery(name = "User.findByLastname", query = "SELECT u FROM User u WHERE u.lastname = :lastname"),
@NamedQuery(name = "User.findByFirstnames", query = "SELECT u FROM User u WHERE u.firstnames = :firstnames"),
@NamedQuery(name = "User.findByBirthday", query = "SELECT u FROM User u WHERE u.birthday = :birthday"),
@NamedQuery(name = "User.findByNick", query = "SELECT u FROM User u WHERE u.nick = :nick"),
@NamedQuery(name = "User.findByEmail", query = "SELECT u FROM User u WHERE u.email = :email"),
@NamedQuery(name = "User.findByAddress", query = "SELECT u FROM User u WHERE u.address = :address"),
@NamedQuery(name = "User.findByZip", query = "SELECT u FROM User u WHERE u.zip = :zip"),
@NamedQuery(name = "User.findByPostalCode", query = "SELECT u FROM User u WHERE u.postalCode = :postalCode"),
@NamedQuery(name = "User.findByTown", query = "SELECT u FROM User u WHERE u.town = :town"),
@NamedQuery(name = "User.findByPhone", query = "SELECT u FROM User u WHERE u.phone = :phone"),
@NamedQuery(name = "User.findByFemale", query = "SELECT u FROM User u WHERE u.female = :female"),
@NamedQuery(name = "User.findByLogin", query = "SELECT u FROM User u WHERE u.login = :login") })
public class User implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "User.findAll", query = "SELECT u FROM User u"),
@NamedQuery(name = "User.findByUsersId", query = "SELECT u FROM User u WHERE u.usersId = :usersId"),
@NamedQuery(name = "User.findByCreated", query = "SELECT u FROM User u WHERE u.created = :created"),
@NamedQuery(name = "User.findByActive", query = "SELECT u FROM User u WHERE u.active = :active"),
@NamedQuery(name = "User.findByPassword", query = "SELECT u FROM User u WHERE u.password = :password"),
@NamedQuery(name = "User.findByLastname", query = "SELECT u FROM User u WHERE u.lastname = :lastname"),
@NamedQuery(name = "User.findByFirstnames", query = "SELECT u FROM User u WHERE u.firstnames = :firstnames"),
@NamedQuery(name = "User.findByBirthday", query = "SELECT u FROM User u WHERE u.birthday = :birthday"),
@NamedQuery(name = "User.findByNick", query = "SELECT u FROM User u WHERE u.nick = :nick"),
@NamedQuery(name = "User.findByEmail", query = "SELECT u FROM User u WHERE u.email = :email"),
@NamedQuery(name = "User.findByAddress", query = "SELECT u FROM User u WHERE u.address = :address"),
@NamedQuery(name = "User.findByZip", query = "SELECT u FROM User u WHERE u.zip = :zip"),
@NamedQuery(name = "User.findByPostalCode", query = "SELECT u FROM User u WHERE u.postalCode = :postalCode"),
@NamedQuery(name = "User.findByTown", query = "SELECT u FROM User u WHERE u.town = :town"),
@NamedQuery(name = "User.findByPhone", query = "SELECT u FROM User u WHERE u.phone = :phone"),
@NamedQuery(name = "User.findByFemale", query = "SELECT u FROM User u WHERE u.female = :female"),
@NamedQuery(name = "User.findByLogin", query = "SELECT u FROM User u WHERE u.login = :login")})
public class User implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/User.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "users_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/User.java
private Integer usersId;
=======
private Integer id;
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/User.java
@Column(name = "created", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date created;
@Column(name = "active", nullable = false)
private boolean active;
@Column(name = "password", length = 2147483647)
private String password;
@Column(name = "lastname", nullable = false, length = 2147483647)
private String lastname;
@Column(name = "firstnames", nullable = false, length = 2147483647)
private String firstnames;
@Column(name = "birthday")
@Temporal(TemporalType.TIMESTAMP)
private Date birthday;
@Column(name = "nick", length = 2147483647)
private String nick;
@Column(name = "email", length = 2147483647)
private String email;
@Column(name = "address", length = 2147483647)
private String address;
@Column(name = "zip", length = 2147483647)
private String zip;
@Column(name = "postal_code", length = 2147483647)
private String postalCode;
@Column(name = "town", length = 2147483647)
private String town;
@Column(name = "phone", length = 2147483647)
private String phone;
@Column(name = "female")
private Boolean female;
@Lob
@Column(name = "gender")
private Object gender;
@Column(name = "login", length = 2147483647)
private String login;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "usersId")
private List<Vote> voteList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "usersId")
private List<RoleMembership> roleMembershipList;
@OneToMany(mappedBy = "usersId")
private List<LogEntry> logEntryList;
@OneToMany(mappedBy = "usersId")
private List<UserImage> userImageList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "usersId")
private List<CompoEntryParticipant> compoEntryParticipantList;
@OneToMany(mappedBy = "creator")
private List<CompoEntry> compoEntryList;
@OneToMany(mappedBy = "groupCreator")
private List<PlaceGroup> placeGroupList;
@OneToMany(mappedBy = "usersId")
private List<GroupMembership> groupMembershipList;
@OneToMany(mappedBy = "usersId")
private List<Place> placeList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "usersId")
private List<PrintedCard> printedCardList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "usersId")
private List<AccountEvent> accountEventList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "usersId")
private List<DiscountInstance> discountInstanceList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "usersId")
private List<Bill> billList;
@Version
@Column(nullable = false)
private int jpaVersionField;
public User() {
}
public User(Integer usersId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/User.java
this.usersId = usersId;
}
public User(Integer usersId, Date created, boolean active, String lastname,
String firstnames) {
this.usersId = usersId;
this.created = created;
this.active = active;
this.lastname = lastname;
this.firstnames = firstnames;
}
public Integer getUsersId() {
return usersId;
}
public void setUsersId(Integer usersId) {
this.usersId = usersId;
}
=======
this.id = usersId;
}
public User(Integer usersId, Date created, boolean active, String lastname, String firstnames) {
this.id = usersId;
this.created = created;
this.active = active;
this.lastname = lastname;
this.firstnames = firstnames;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/User.java
public Date getCreated() {
return created;
}
public void setCreated(Date created) {
this.created = created;
}
public boolean getActive() {
return active;
}
public void setActive(boolean active) {
this.active = active;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getLastname() {
return lastname;
}
public void setLastname(String lastname) {
this.lastname = lastname;
}
public String getFirstnames() {
return firstnames;
}
public void setFirstnames(String firstnames) {
this.firstnames = firstnames;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public String getNick() {
return nick;
}
public void setNick(String nick) {
this.nick = nick;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getZip() {
return zip;
}
public void setZip(String zip) {
this.zip = zip;
}
public String getPostalCode() {
return postalCode;
}
public void setPostalCode(String postalCode) {
this.postalCode = postalCode;
}
public String getTown() {
return town;
}
public void setTown(String town) {
this.town = town;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public Boolean getFemale() {
return female;
}
public void setFemale(Boolean female) {
this.female = female;
}
public Object getGender() {
return gender;
}
public void setGender(Object gender) {
this.gender = gender;
}
public String getLogin() {
return login;
}
public void setLogin(String login) {
this.login = login;
}
public List<Vote> getVoteList() {
return voteList;
}
public void setVoteList(List<Vote> voteList) {
this.voteList = voteList;
}
public List<RoleMembership> getRoleMembershipList() {
return roleMembershipList;
}
public void setRoleMembershipList(List<RoleMembership> roleMembershipList) {
this.roleMembershipList = roleMembershipList;
}
public List<LogEntry> getLogEntryList() {
return logEntryList;
}
public void setLogEntryList(List<LogEntry> logEntryList) {
this.logEntryList = logEntryList;
}
public List<UserImage> getUserImageList() {
return userImageList;
}
public void setUserImageList(List<UserImage> userImageList) {
this.userImageList = userImageList;
}
public List<CompoEntryParticipant> getCompoEntryParticipantList() {
return compoEntryParticipantList;
}
public void setCompoEntryParticipantList(
List<CompoEntryParticipant> compoEntryParticipantList) {
this.compoEntryParticipantList = compoEntryParticipantList;
}
public List<CompoEntry> getCompoEntryList() {
return compoEntryList;
}
public void setCompoEntryList(List<CompoEntry> compoEntryList) {
this.compoEntryList = compoEntryList;
}
public List<PlaceGroup> getPlaceGroupList() {
return placeGroupList;
}
public void setPlaceGroupList(List<PlaceGroup> placeGroupList) {
this.placeGroupList = placeGroupList;
}
public List<GroupMembership> getGroupMembershipList() {
return groupMembershipList;
}
public void setGroupMembershipList(List<GroupMembership> groupMembershipList) {
this.groupMembershipList = groupMembershipList;
}
public List<Place> getPlaceList() {
return placeList;
}
public void setPlaceList(List<Place> placeList) {
this.placeList = placeList;
}
public List<PrintedCard> getPrintedCardList() {
return printedCardList;
}
public void setPrintedCardList(List<PrintedCard> printedCardList) {
this.printedCardList = printedCardList;
}
public List<AccountEvent> getAccountEventList() {
return accountEventList;
}
public void setAccountEventList(List<AccountEvent> accountEventList) {
this.accountEventList = accountEventList;
}
public List<DiscountInstance> getDiscountInstanceList() {
return discountInstanceList;
}
public void setDiscountInstanceList(
List<DiscountInstance> discountInstanceList) {
this.discountInstanceList = discountInstanceList;
}
public List<Bill> getBillList() {
return billList;
}
public void setBillList(List<Bill> billList) {
this.billList = billList;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/User.java
int hash = 0;
hash += (usersId != null ? usersId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/User.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/User.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof User)) {
return false;
}
User other = (User) object;
if ((this.usersId == null && other.usersId != null)
|| (this.usersId != null && !this.usersId.equals(other.usersId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof User)) {
return false;
}
User other = (User) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/User.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/User.java
return "fi.insomnia.bortal.model.User[usersId=" + usersId + "]";
=======
return "fi.insomnia.bortal.model.User[usersId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/User.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Version;
/**
*
* @author jkj
*/
@Entity
@Table(name = "user_images")
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/UserImage.java
@NamedQueries( {
@NamedQuery(name = "UserImage.findAll", query = "SELECT u FROM UserImage u"),
@NamedQuery(name = "UserImage.findByUserImagesId", query = "SELECT u FROM UserImage u WHERE u.userImagesId = :userImagesId"),
@NamedQuery(name = "UserImage.findByName", query = "SELECT u FROM UserImage u WHERE u.name = :name"),
@NamedQuery(name = "UserImage.findByDescription", query = "SELECT u FROM UserImage u WHERE u.description = :description"),
@NamedQuery(name = "UserImage.findByMimeType", query = "SELECT u FROM UserImage u WHERE u.mimeType = :mimeType") })
public class UserImage implements Serializable {
=======
@NamedQueries({
@NamedQuery(name = "UserImage.findAll", query = "SELECT u FROM UserImage u"),
@NamedQuery(name = "UserImage.findByUserImagesId", query = "SELECT u FROM UserImage u WHERE u.userImagesId = :userImagesId"),
@NamedQuery(name = "UserImage.findByName", query = "SELECT u FROM UserImage u WHERE u.name = :name"),
@NamedQuery(name = "UserImage.findByDescription", query = "SELECT u FROM UserImage u WHERE u.description = :description"),
@NamedQuery(name = "UserImage.findByMimeType", query = "SELECT u FROM UserImage u WHERE u.mimeType = :mimeType")})
public class UserImage implements ModelInterface {
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/UserImage.java
private static final long serialVersionUID = 1L;
@Id
@Column(name = "user_images_id", nullable = false)
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/UserImage.java
private Integer userImagesId;
@Column(name = "name")
=======
private Integer id;
@Column(name = "name", length = 2147483647)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/UserImage.java
private String name;
@Column(name = "description")
private String description;
@Column(name = "mime_type")
private String mimeType;
@Lob
@Column(name = "image_data")
private byte[] imageData;
@JoinColumn(name = "users_id", referencedColumnName = "users_id")
@ManyToOne
private User usersId;
@Version
@Column(nullable = false)
private int jpaVersionField;
public UserImage() {
}
public UserImage(Integer userImagesId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/UserImage.java
this.userImagesId = userImagesId;
}
public Integer getUserImagesId() {
return userImagesId;
}
public void setUserImagesId(Integer userImagesId) {
this.userImagesId = userImagesId;
=======
this.id = userImagesId;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/UserImage.java
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getMimeType() {
return mimeType;
}
public void setMimeType(String mimeType) {
this.mimeType = mimeType;
}
public byte[] getImageData() {
return imageData;
}
public void setImageData(byte[] imageData) {
this.imageData = imageData;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/UserImage.java
int hash = 0;
hash += (userImagesId != null ? userImagesId.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/UserImage.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/UserImage.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof UserImage)) {
return false;
}
UserImage other = (UserImage) object;
if ((this.userImagesId == null && other.userImagesId != null)
|| (this.userImagesId != null && !this.userImagesId
.equals(other.userImagesId))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof UserImage)) {
return false;
}
UserImage other = (UserImage) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/UserImage.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/UserImage.java
return "fi.insomnia.bortal.model.UserImage[userImagesId="
+ userImagesId + "]";
=======
return "fi.insomnia.bortal.model.UserImage[userImagesId=" + getId() + "]";
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/UserImage.java
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.insomnia.bortal.model;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;
/**
* A vote for a compo entry
*/
@Entity
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Vote.java
@Table(name = "votes", uniqueConstraints = { @UniqueConstraint(columnNames = {
"entries_id", "users_id" }) })
@NamedQueries( {
@NamedQuery(name = "Vote.findAll", query = "SELECT v FROM Vote v"),
@NamedQuery(name = "Vote.findById", query = "SELECT v FROM Vote v WHERE v.id = :id"),
@NamedQuery(name = "Vote.findByScore", query = "SELECT v FROM Vote v WHERE v.score = :score"),
@NamedQuery(name = "Vote.findByVoteTime", query = "SELECT v FROM Vote v WHERE v.voteTime = :voteTime") })
public class Vote implements Serializable {
private static final long serialVersionUID = 1L;
@Id
=======
@Table(name = "votes", uniqueConstraints = {
@UniqueConstraint(columnNames = {
"entries_id", "users_id"})})
@NamedQueries({
@NamedQuery(name = "Vote.findAll", query = "SELECT v FROM Vote v"),
@NamedQuery(name = "Vote.findByVotesId", query = "SELECT v FROM Vote v WHERE v.votesId = :votesId"),
@NamedQuery(name = "Vote.findByScore", query = "SELECT v FROM Vote v WHERE v.score = :score"),
@NamedQuery(name = "Vote.findByVoteTime", query = "SELECT v FROM Vote v WHERE v.voteTime = :voteTime")})
public class Vote implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Vote.java
@Column(name = "votes_id", nullable = false)
private Integer id;
@Column(name = "score")
private Integer score;
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Vote.java
=======
@Basic(optional = false)
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Vote.java
@Column(name = "vote_time", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date voteTime;
@JoinColumn(name = "entries_id", referencedColumnName = "entries_id", nullable = false)
@ManyToOne(optional = false)
private CompoEntry entriesId;
@JoinColumn(name = "users_id", referencedColumnName = "users_id", nullable = false)
@ManyToOne(optional = false)
private User usersId;
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Vote.java
=======
@Version
@Column(nullable = false)
private int jpaVersionField;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Vote.java
public Vote() {
}
public Vote(Integer votesId) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Vote.java
this.id = votesId;
}
public Vote(Integer votesId, Date voteTime) {
this.id = votesId;
this.voteTime = voteTime;
}
public Integer getVotesId() {
return id;
}
public void setVotesId(Integer votesId) {
this.id = votesId;
}
public Integer getScore() {
return score;
}
public void setScore(Integer score) {
this.score = score;
}
public Date getVoteTime() {
return voteTime;
}
public void setVoteTime(Date voteTime) {
this.voteTime = voteTime;
}
public CompoEntry getEntriesId() {
return entriesId;
}
public void setEntriesId(CompoEntry entriesId) {
this.entriesId = entriesId;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
=======
this.id = votesId;
}
public Vote(Integer votesId, Date voteTime) {
this.id = votesId;
this.voteTime = voteTime;
}
public Integer getId() {
return id;
}
public void setId(Integer votesId) {
this.id = votesId;
}
public Integer getScore() {
return score;
}
public void setScore(Integer score) {
this.score = score;
}
public Date getVoteTime() {
return voteTime;
}
public void setVoteTime(Date voteTime) {
this.voteTime = voteTime;
}
public CompoEntry getEntriesId() {
return entriesId;
}
public void setEntriesId(CompoEntry entriesId) {
this.entriesId = entriesId;
}
public User getUsersId() {
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Vote.java
}
@Override
public int hashCode() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Vote.java
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
=======
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Vote.java
}
@Override
public boolean equals(Object object) {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Vote.java
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Vote)) {
return false;
}
Vote other = (Vote) object;
if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
=======
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Vote)) {
return false;
}
Vote other = (Vote) object;
if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Vote.java
}
@Override
public String toString() {
<<<<<<< HEAD:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Vote.java
return "fi.insomnia.bortal.model.Vote[id=" + id + "]";
}
=======
return "fi.insomnia.bortal.model.Vote[votesId=" + id + "]";
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
}
>>>>>>> not ewerything is working:code/LanBortalDatabase/src/fi/insomnia/bortal/model/Vote.java
}
#Sun Mar 07 02:21:40 EET 2010 #Sun Mar 07 12:33:11 EET 2010
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.compiler.compliance=1.6
...@@ -75,7 +75,7 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true ...@@ -75,7 +75,7 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
org.eclipse.jdt.core.formatter.indentation.size=4 org.eclipse.jdt.core.formatter.indentation.size=8
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
...@@ -248,18 +248,18 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constan ...@@ -248,18 +248,18 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constan
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_lines_in_comments=true
org.eclipse.jdt.core.formatter.join_wrapped_lines=true org.eclipse.jdt.core.formatter.join_wrapped_lines=false
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.jdt.core.formatter.lineSplit=80 org.eclipse.jdt.core.formatter.lineSplit=9999
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=mixed org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=8 org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
#Sun Mar 07 02:21:40 EET 2010 #Sun Mar 07 12:33:11 EET 2010
eclipse.preferences.version=1 eclipse.preferences.version=1
formatter_profile=org.eclipse.jdt.ui.default.sun_profile formatter_profile=_InsomniaConventions
formatter_settings_version=11 formatter_settings_version=11
...@@ -17,6 +17,13 @@ ...@@ -17,6 +17,13 @@
<servlet-name>Faces Servlet</servlet-name> <servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern> <url-pattern>*.jsf</url-pattern>
</servlet-mapping> </servlet-mapping>
<filter>
<display-name>EventI18nFilter</display-name>
<filter-name>EventI18nFilter</filter-name>
<filter-class>fi.insomnia.bortal.i18n.EventI18nFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>EventI18nFilter</filter-name>
<url-pattern>/EventI18nFilter</url-pattern>
</filter-mapping>
</web-app> </web-app>
\ No newline at end of file
...@@ -20,8 +20,7 @@ public class UserView { ...@@ -20,8 +20,7 @@ public class UserView {
@EJB @EJB
private UserBeanLocal userBean; private UserBeanLocal userBean;
private static final Logger logger = LoggerFactory private static final Logger logger = LoggerFactory.getLogger(UserView.class);
.getLogger(UserView.class);
private User user; private User user;
...@@ -38,9 +37,9 @@ public class UserView { ...@@ -38,9 +37,9 @@ public class UserView {
public String createUser() { public String createUser() {
logger.info("Saving user"); logger.info("Saving user");
// Luodaan uusi k�ytt�j� UserBeanin funktiolla createNewUser jolle // Luodaan uusi kÔøΩyttÔøΩjÔøΩ UserBeanin funktiolla createNewUser jolle
// annetaan parametrina pakolliset tiedot ( nick ja salasana ) // annetaan parametrina pakolliset tiedot ( nick ja salasana )
// Paluuarvona saadaan uusi uljas k�ytt�j�-olio. // Paluuarvona saadaan uusi uljas kÔøΩyttÔøΩjÔøΩ-olio.
setUser(userBean.createNewUser(nick, password)); setUser(userBean.createNewUser(nick, password));
nick = ""; nick = "";
password = ""; password = "";
...@@ -68,6 +67,7 @@ public class UserView { ...@@ -68,6 +67,7 @@ public class UserView {
public String getNick() { public String getNick() {
return nick; return nick;
} }
public void setNick(String nick) { public void setNick(String nick) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!