Commit 7e45321b by Tuukka Kivilahti

vanhat muutokset, siivoan joskus

1 parent 57f87311
Showing with 4682 additions and 33 deletions
#Sun Mar 07 12:22:07 EET 2010
#Sun Mar 07 12:30:43 EET 2010
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.unusedLocal=preserve
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.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
......
......@@ -2,15 +2,15 @@ package fi.insomnia.bortal.beans;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fi.insomnia.bortal.UserBeanLocal;
import fi.insomnia.bortal.facade.UserFacade;
import fi.insomnia.bortal.model.User;
/**
......@@ -18,16 +18,16 @@ import fi.insomnia.bortal.model.User;
*/
@LocalBean
@Stateless
public class UserBean extends Generiimplements UserBeanLocal {
public class UserBean implements UserBeanLocal {
private static final Logger logger = LoggerFactory.getLogger(UserBean.class);
/**
* Java EE container injektoi t�m�n luokkamuuttujan luokan luonnin
* yhteydess�.
*/
@PersistenceContext
private EntityManager em;
@EJB
private UserFacade userFacade;
/**
* Default constructor.
*/
......@@ -44,26 +44,23 @@ public class UserBean extends Generiimplements UserBeanLocal {
returnUser.setPassword(password);
// Tallennetaan olio kantaan...
em.persist(returnUser);
userFacade.create(returnUser);
return returnUser;
}
public List<User> getUsers() {
List<User> ret = em.createQuery("select u from User u", User.class)
.getResultList();
List<User> ret = userFacade.findAll();
logger.info("Found {} users from database ", ret.size());
return ret;
}
@Override
public void mergeChanges(User currentUser) {
em.merge(currentUser);
public void mergeChanges(User user) {
userFacade.merge(user);
}
public User getUser(String nick) {
User ret = em.createQuery("select u from User u where u.nick = :name",
User.class).setParameter("name", nick).getSingleResult();
return ret;
return userFacade.findByLogin(nick);
}
}
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;
*/
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();
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
org.eclipse.jdt.core.compiler.codegen.targetPlatform=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
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_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_member=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
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.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_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_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_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_empty_lines_to_preserve=1
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.size=8
org.eclipse.jdt.core.formatter.tabulation.char=space
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.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
formatter_profile=org.eclipse.jdt.ui.default.sun_profile
formatter_profile=_InsomniaConventions
formatter_settings_version=11
#Sun Mar 07 02:14:35 EET 2010
#Sun Mar 07 12:30:58 EET 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
......@@ -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_switchstatements_compare_to_cases=true
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_member=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
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.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_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_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_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_empty_lines_to_preserve=1
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.size=8
org.eclipse.jdt.core.formatter.tabulation.char=space
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.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
eclipse.preferences.version=1
formatter_profile=org.eclipse.jdt.ui.default.sun_profile
formatter_profile=_InsomniaConventions
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 {
@OneToMany(mappedBy = "cardTemplate")
private List<Role> roles;
@OneToMany(mappedBy = "cardTemplate")
private List<PrintedCard> cards;
@Version
@Column(nullable = false)
private int jpaVersionField;
......@@ -139,4 +142,12 @@ public class CardTemplate implements ModelInterface {
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;
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!