Commit add711cc by Tuukka Kivilahti

Merge branch 'barcodefuckup' of codecrew.fi:tkfftk/moya into barcodefuckup

2 parents 2e74c684 6c45b6a2
......@@ -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[] { "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[] { "DELETE TABLE card_barcode"});
}
@EJB
......
......@@ -3,14 +3,14 @@ package fi.codecrew.moya.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import fi.codecrew.moya.model.CardBarcode;
import fi.codecrew.moya.model.CardCode;
@Stateless
@LocalBean
public class CardBarcodeFacade extends IntegerPkGenericFacade<CardBarcode> {
public class CardBarcodeFacade extends IntegerPkGenericFacade<CardCode> {
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 {
return null;
}
public void checkAdobeMarker(File file) throws IOException, ImageReadException {
JpegImageParser parser = new JpegImageParser();
ByteSource byteSource = new ByteSourceFile(file);
@SuppressWarnings("rawtypes")
List<Segment> segments = parser.readSegments(byteSource, new int[] { 0xffee }, true);
if (segments != null && segments.size() >= 1) {
UnknownSegment app14Segment = (UnknownSegment) segments.get(0);
......
Jotain todella järkevää ja kivaa jota kaikki haluaa
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!