Commit 6c45b6a2 by Juho Salli

Removed cardbarcode stuff and added cardcode thingys.

1 parent 44d3fd0f
...@@ -34,6 +34,7 @@ public class BootstrapBean implements BootstrapBeanLocal { ...@@ -34,6 +34,7 @@ public class BootstrapBean implements BootstrapBeanLocal {
dbUpdates.add(new String[] { "DELETE FROM application_permissions WHERE application = 'MAP' and permission = 'RELEASE_PLACE'" }); dbUpdates.add(new String[] { "DELETE FROM application_permissions WHERE application = 'MAP' and permission = 'RELEASE_PLACE'" });
dbUpdates.add(new String[] { "ALTER TABLE site_page_content ADD COLUMN locale varchar(10)" }); dbUpdates.add(new String[] { "ALTER TABLE site_page_content ADD COLUMN locale varchar(10)" });
dbUpdates.add(new String[] { "ALTER TABLE products ALTER COLUMN vat TYPE NUMERIC(4,3)" }); dbUpdates.add(new String[] { "ALTER TABLE products ALTER COLUMN vat TYPE NUMERIC(4,3)" });
dbUpdates.add(new String[] { "DELETE TABLE card_barcode"});
} }
@EJB @EJB
......
...@@ -3,14 +3,14 @@ package fi.codecrew.moya.facade; ...@@ -3,14 +3,14 @@ package fi.codecrew.moya.facade;
import javax.ejb.LocalBean; import javax.ejb.LocalBean;
import javax.ejb.Stateless; import javax.ejb.Stateless;
import fi.codecrew.moya.model.CardBarcode; import fi.codecrew.moya.model.CardCode;
@Stateless @Stateless
@LocalBean @LocalBean
public class CardBarcodeFacade extends IntegerPkGenericFacade<CardBarcode> { public class CardBarcodeFacade extends IntegerPkGenericFacade<CardCode> {
public CardBarcodeFacade() { public CardBarcodeFacade() {
super(CardBarcode.class); super(CardCode.class);
} }
} }
package fi.codecrew.moya.model;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.eclipse.persistence.annotations.OptimisticLocking;
import org.eclipse.persistence.annotations.OptimisticLockingType;
@Entity
@Table(name = "card_barcode")
@OptimisticLocking(type = OptimisticLockingType.CHANGED_COLUMNS)
public class CardBarcode extends GenericEntity {
private static final long serialVersionUID = 4771609802672223277L;
@ManyToOne
@JoinColumn(name = "printed_cards_id")
private PrintedCard printedCard;
public PrintedCard getPrintedCard() {
return printedCard;
}
public void setPrintedCard(PrintedCard printedCard) {
this.printedCard = printedCard;
}
}
...@@ -66,11 +66,11 @@ public class JpegReader { ...@@ -66,11 +66,11 @@ public class JpegReader {
return null; return null;
} }
public void checkAdobeMarker(File file) throws IOException, ImageReadException { public void checkAdobeMarker(File file) throws IOException, ImageReadException {
JpegImageParser parser = new JpegImageParser(); JpegImageParser parser = new JpegImageParser();
ByteSource byteSource = new ByteSourceFile(file); ByteSource byteSource = new ByteSourceFile(file);
@SuppressWarnings("rawtypes")
List<Segment> segments = parser.readSegments(byteSource, new int[] { 0xffee }, true); List<Segment> segments = parser.readSegments(byteSource, new int[] { 0xffee }, true);
if (segments != null && segments.size() >= 1) { if (segments != null && segments.size() >= 1) {
UnknownSegment app14Segment = (UnknownSegment) segments.get(0); UnknownSegment app14Segment = (UnknownSegment) segments.get(0);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!