This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mycompany; | |
import java.net.URISyntaxException; | |
import java.util.Date; | |
import java.util.UUID; | |
import javax.jms.Connection; | |
import javax.jms.Destination; | |
import javax.jms.JMSException; | |
import javax.jms.MapMessage; | |
import javax.jms.Message; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
public class Item implements Serializable { | |
@Id | |
@GeneratedValue(strategy = GenerationType.AUTO) | |
private Long id; | |
private String name; | |
@MapKeyJoinColumn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* OrderUtils.java | |
*/ | |
public static JEditorPane getOrderPrintable( | |
ReceiptConfiguration configuration, | |
Order order) { | |
StringBuilder printing = new StringBuilder(); | |
printing.append(configuration.getReceiptHeader()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.ibatis.jdbc.ScriptRunner; | |
@Resource(mappedName = "ecumen/jdbc/smedev") | |
private DataSource dataSource; | |
@Override | |
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) | |
public void saveAdmin() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String update() { | |
Context ctx = null; | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JRDataSource jrDataSource = new JRBeanCollectionDataSource(delivery.getDeliveryItems()); | |
Map<String, Object> params = new HashMap<String, Object>(); | |
params.put("startPosition", delivery.getStartPosition()); | |
params.put("finishPosition", delivery.getFinishPosition()); | |
params.put("startDate", delivery.getStartDate()); | |
params.put("finishDate", delivery.getFinishDate()); | |
JasperReport report = (JasperReport)JRLoader.loadObject(new File("C:\\delivery.jrxml.jasper")); | |
JasperPrint jrPrint = JasperFillManager.fillReport(report, params, jrDataSource); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Send confirmation SMS | |
// Uses javax comm | |
// Installing guide found at http://smslib.org/doc/installation/ | |
// File comm.jar should go under JDKDIR/jre/lib/ext/ | |
// File javax.comm.properties should go under JDKDIR/jre/lib/ | |
// Library files (i.e. win32com.dll for Win32 or the .so Linux library files) should go under JDKDIR/jre/bin/ | |
System.out.println("Ports..."); | |
Enumeration portList = CommPortIdentifier.getPortIdentifiers(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.ubdynamics.architect.web; | |
import java.util.Hashtable; | |
import javax.naming.CommunicationException; | |
import javax.naming.Context; | |
import javax.naming.InitialContext; | |
import javax.naming.NamingException; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UnitOfWork works = ((JpaEntityManager) em.getDelegate()) | |
.getUnitOfWork(); | |
UnitOfWorkChangeSet changes = works.getCurrentChanges(); | |
ObjectChangeSet objectChangeSet = changes | |
.getObjectChangeSetForClone(someEntityInstance); | |
if (objectChangeSet != null) { | |
final List<ChangeRecord> changedProperties = objectChangeSet | |
.getChanges(); | |
for (final ChangeRecord property : changedProperties) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ManagedBean(name = "backing_index") | |
@ViewScoped | |
public class IndexBacking implements Serializable { | |
private static final long serialVersionUID = 1L; | |
@EJB | |
private EntityBeanRemote entityBean; | |
@EJB |
NewerOlder