2 Commits

Author SHA1 Message Date
hugh 62a88fd045 ignoring neovim configs 2025-12-09 19:04:24 +00:00
hugh 548386407f missing logback? 2025-11-20 13:14:21 +00:00
3 changed files with 141 additions and 104 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ nbactions.xml
*.log *.log
docker.sock docker.sock
.DS_Store .DS_Store
.settings/
.classpath .classpath
.factorypath .factorypath
.settings/
.project .project
+33
View File
@@ -0,0 +1,33 @@
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,120 +24,124 @@ import com.unicenta.data.loader.DataRead;
import com.unicenta.data.loader.IKeyed; import com.unicenta.data.loader.IKeyed;
import com.unicenta.data.loader.SerializerRead; import com.unicenta.data.loader.SerializerRead;
public class VoucherInfo implements IKeyed { public class VoucherInfo implements IKeyed {
private String id; private String id;
private String voucherNumber; private String voucherNumber;
private String customerName; private String customerName;
private double amount; private double amount;
private String status; private String status;
public VoucherInfo() { public VoucherInfo() {
} }
public VoucherInfo( public VoucherInfo(
String id, String id,
String voucherNumber, String voucherNumber,
String customerName, String customerName,
double amount, double amount,
String status) { String status)
this.id = id; {
this.voucherNumber = voucherNumber; this.id = id;
this.customerName = customerName; this.voucherNumber = voucherNumber;
this.amount = amount; this.customerName = customerName;
this.status = status; this.amount = amount;
} this.status = status;
}
@Override @Override
public Object getKey() { public Object getKey() {
return getId(); return getId();
} }
/** /**
* @return the id * @return the id
*/ */
public String getId() { public String getId() {
return id; return id;
} }
/** /**
* @param id the id to set * @param id the id to set
*/ */
public void setId(String id) { public void setId(String id) {
this.id = id; this.id = id;
} }
/** /**
* @return the voucherNumber * @return the voucherNumber
*/ */
public String getVoucherNumber() { public String getVoucherNumber() {
return voucherNumber; return voucherNumber;
} }
/** /**
* @param voucherNumber the voucherNumber to set * @param voucherNumber the voucherNumber to set
*/ */
public void setVoucherNumber(String voucherNumber) { public void setVoucherNumber(String voucherNumber) {
this.voucherNumber = voucherNumber; this.voucherNumber = voucherNumber;
} }
/**
* @return the customerName
*/
public String getCustomerName() {
return customerName;
}
/** /**
* @return the customerName * @param customerName the customerName to set
*/ */
public String getCustomerName() { public void setCustomerName(String customerName) {
return customerName; this.customerName = customerName;
} }
/** /**
* @param customerName the customerName to set * @return the amount
*/ */
public void setCustomerName(String customerName) { public double getAmount() {
this.customerName = customerName; return amount;
} }
/** /**
* @return the amount * @param amount the amount to set
*/ */
public double getAmount() { public void setAmount(double amount) {
return amount; this.amount = amount;
} }
@Override
public String toString() {
return voucherNumber;
}
/**
* @return the status
*/
public String getStatus() {
return status;
}
/** /**
* @param amount the amount to set * @param status the status to set
*/ */
public void setAmount(double amount) { public void setStatus(String status) {
this.amount = amount; this.status = status;
} }
@Override public static SerializerRead getSerializerRead() {
public String toString() { return new SerializerRead()
return voucherNumber; {
} @Override
public Object readValues(DataRead dr) throws BasicException {
/** return new VoucherInfo(
* @return the status dr.getString(1),
*/ dr.getString(2),
public String getStatus() { dr.getString(3),
return status; dr.getDouble(4),
} dr.getString(5));
}};
/** }
* @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));
}
};
}
} }