Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 94d587705c | |||
| aa6c87ab90 |
+1
-1
@@ -7,7 +7,7 @@ nbactions.xml
|
||||
*.log
|
||||
docker.sock
|
||||
.DS_Store
|
||||
.settings/
|
||||
.classpath
|
||||
.factorypath
|
||||
.settings/
|
||||
.project
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
import static ch.qos.logback.classic.Level.DEBUG
|
||||
import static ch.qos.logback.classic.Level.INFO
|
||||
import static ch.qos.logback.classic.Level.ALL
|
||||
|
||||
import ch.qos.logback.classic.encoder.PatternLayoutEncoder
|
||||
import ch.qos.logback.core.rolling.RollingFileAppender
|
||||
import ch.qos.logback.core.rolling.TimeBasedRollingPolicy
|
||||
|
||||
import java.nio.charset.Charset
|
||||
|
||||
def patternString = '%d{YYYY-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg %ex{20}%n'
|
||||
def userHome = System.getProperty("user.home")
|
||||
|
||||
appender("applicationLogFile", RollingFileAppender) {
|
||||
rollingPolicy(TimeBasedRollingPolicy) {
|
||||
fileNamePattern = "$userHome/.unicenta/unicenta-%d{yyyy-MM-dd}.log"
|
||||
maxHistory = "5"
|
||||
}
|
||||
encoder(PatternLayoutEncoder) {
|
||||
charset = Charset.forName("UTF-8")
|
||||
pattern = patternString
|
||||
}
|
||||
}
|
||||
|
||||
appender('console', ConsoleAppender) {
|
||||
encoder(PatternLayoutEncoder) {
|
||||
pattern = patternString
|
||||
}
|
||||
}
|
||||
|
||||
logger('com.unicenta', DEBUG)
|
||||
|
||||
root(DEBUG, ['console', 'applicationLogFile'])
|
||||
@@ -24,124 +24,120 @@ import com.unicenta.data.loader.DataRead;
|
||||
import com.unicenta.data.loader.IKeyed;
|
||||
import com.unicenta.data.loader.SerializerRead;
|
||||
|
||||
|
||||
public class VoucherInfo implements IKeyed {
|
||||
private String id;
|
||||
private String voucherNumber;
|
||||
private String customerName;
|
||||
private double amount;
|
||||
private String status;
|
||||
private String id;
|
||||
private String voucherNumber;
|
||||
private String customerName;
|
||||
private double amount;
|
||||
private String status;
|
||||
|
||||
public VoucherInfo() {
|
||||
}
|
||||
public VoucherInfo() {
|
||||
}
|
||||
|
||||
public VoucherInfo(
|
||||
String id,
|
||||
String voucherNumber,
|
||||
String customerName,
|
||||
double amount,
|
||||
String status)
|
||||
{
|
||||
this.id = id;
|
||||
this.voucherNumber = voucherNumber;
|
||||
this.customerName = customerName;
|
||||
this.amount = amount;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public VoucherInfo(
|
||||
String id,
|
||||
String voucherNumber,
|
||||
String customerName,
|
||||
double amount,
|
||||
String status) {
|
||||
this.id = id;
|
||||
this.voucherNumber = voucherNumber;
|
||||
this.customerName = customerName;
|
||||
this.amount = amount;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getKey() {
|
||||
return getId();
|
||||
}
|
||||
@Override
|
||||
public Object getKey() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the id
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
* @return the id
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id the id to set
|
||||
*/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* @param id the id to set
|
||||
*/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the voucherNumber
|
||||
*/
|
||||
public String getVoucherNumber() {
|
||||
return voucherNumber;
|
||||
}
|
||||
/**
|
||||
* @return the voucherNumber
|
||||
*/
|
||||
public String getVoucherNumber() {
|
||||
return voucherNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param voucherNumber the voucherNumber to set
|
||||
*/
|
||||
public void setVoucherNumber(String voucherNumber) {
|
||||
this.voucherNumber = voucherNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the customerName
|
||||
*/
|
||||
public String getCustomerName() {
|
||||
return customerName;
|
||||
}
|
||||
/**
|
||||
* @param voucherNumber the voucherNumber to set
|
||||
*/
|
||||
public void setVoucherNumber(String voucherNumber) {
|
||||
this.voucherNumber = voucherNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param customerName the customerName to set
|
||||
*/
|
||||
public void setCustomerName(String customerName) {
|
||||
this.customerName = customerName;
|
||||
}
|
||||
/**
|
||||
* @return the customerName
|
||||
*/
|
||||
public String getCustomerName() {
|
||||
return customerName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the amount
|
||||
*/
|
||||
public double getAmount() {
|
||||
return amount;
|
||||
}
|
||||
/**
|
||||
* @param customerName the customerName to set
|
||||
*/
|
||||
public void setCustomerName(String customerName) {
|
||||
this.customerName = customerName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param amount the amount to set
|
||||
*/
|
||||
public void setAmount(double amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return voucherNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the status
|
||||
*/
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
/**
|
||||
* @return the amount
|
||||
*/
|
||||
public double getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param status the status to set
|
||||
*/
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
/**
|
||||
* @param amount the amount to set
|
||||
*/
|
||||
public void setAmount(double amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public static SerializerRead getSerializerRead() {
|
||||
return new SerializerRead()
|
||||
{
|
||||
@Override
|
||||
public Object readValues(DataRead dr) throws BasicException {
|
||||
return new VoucherInfo(
|
||||
dr.getString(1),
|
||||
dr.getString(2),
|
||||
dr.getString(3),
|
||||
dr.getDouble(4),
|
||||
dr.getString(5));
|
||||
}};
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return voucherNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the status
|
||||
*/
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param status the status to set
|
||||
*/
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public static SerializerRead getSerializerRead() {
|
||||
return new SerializerRead() {
|
||||
@Override
|
||||
public Object readValues(DataRead dr) throws BasicException {
|
||||
return new VoucherInfo(
|
||||
dr.getString(1),
|
||||
dr.getString(2),
|
||||
dr.getString(3),
|
||||
dr.getDouble(4),
|
||||
dr.getString(5));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user