This file contains 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 | |
@Table(name = "order_transaction") | |
@Data | |
public class OrderTransaction { | |
@Id | |
@GeneratedValue(strategy = GenerationType.IDENTITY) | |
private Long orderId; | |
private String OrderProduct; | |
private LocalDate orderDate; |
This file contains 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
....... | |
<properties> | |
<hibernate.version>5.0.0.Final</hibernate.version> | |
<mysql.version>5.1.36</mysql.version> | |
<java.version>1.8</java.version> | |
</properties> | |
<dependencies> | |
<dependency> | |
<groupId>org.hibernate</groupId> | |
<artifactId>hibernate-entitymanager</artifactId> |
This file contains 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
<dependency> | |
<groupId>org.hibernate</groupId> | |
<artifactId>hibernate-java8</artifactId> | |
<version>${hibernate.version}</version> | |
</dependency> |
This file contains 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
CREATE TABLE `order_transaction` ( | |
`orderId` bigint(20) NOT NULL AUTO_INCREMENT, | |
`OrderProduct` varchar(255) DEFAULT NULL, | |
`orderCreated` timestamp NULL DEFAULT NULL, | |
`orderDate` date DEFAULT NULL, | |
`orderTime` time DEFAULT NULL, | |
PRIMARY KEY (`orderId`) | |
) |
This file contains 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 static void main(String[] args) { | |
EntityManager em =PersistenceManager.INSTANCE.getEntityManager(); | |
em.getTransaction().begin(); | |
for (int i = 0; i < 10; i++) { | |
OrderTransaction order=new OrderTransaction(); | |
order.setOrderProduct("Computer No "+i); | |
//Date With LocalDate | |
order.setOrderDate(LocalDate.now()); | |
//Time With LocalTime | |
order.setOrderTime(LocalTime.now()); |
This file contains 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 class Kembalian{ | |
public static void pecahUang(Long nilai){ | |
Long _nilai=nilai; | |
/*Nilai Pecahan Indonesia*/ | |
Long _100rb=100000L; | |
Long _50rb =50000L; | |
Long _20rb =20000L; | |
Long _10rb = 10000L; |
This file contains 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 java.math.RoundingMode; | |
import java.math.BigDecimal; | |
public class Pembulatan | |
{ | |
public static int pembulatan1000( int nilai ){ | |
BigDecimal _value = new BigDecimal( (double)nilai/1000); | |
_value= _value.setScale(0,RoundingMode.UP); | |
return _value.intValue()*1000; | |
} | |
public static void main(String []args){ |
This file contains 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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.mongodb</groupId> | |
<artifactId>spark-test</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>M101J</name> |
This file contains 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
@Override | |
public Map<String, Object> sendNotif(List<RequestEmailNotifHelper>requests) { | |
try { | |
//TODO: open remark after ready to implemented | |
HashMap<String, Object> param = new HashMap<>() ; | |
param.put(IEmailNotifConstans.IMailParamJson.TEMPLATE_ID,4568); | |
This file contains 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
@Override | |
public Map<String, Object> sendNotif(List<RequestEmailNotifHelper>requests) { | |
try { | |
//TODO: open remark after ready to implemented | |
HashMap<String, Object> param = new HashMap<>() ; | |
param.put(IEmailNotifConstans.IMailParamJson.TEMPLATE_ID,4568); | |
OlderNewer