modularize project
This commit is contained in:
1 parent
915fc4a87b
commit
481280ed88
200 files changed
+177
-101
No files matched your search
+46
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<parent>
|
||||
<artifactId>jef</artifactId>
|
||||
<groupId>jef</groupId>
|
||||
<version>0.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>cli</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<mainClass>jef.main.Main</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jef</groupId>
|
||||
<artifactId>core</artifactId>
|
||||
<version>0.1</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,23 @@
|
||||
package jef.util;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public abstract class Util {
|
||||
public static <T> Optional<T> tryGet(ThrowableSupplier<T> s) {
|
||||
try {
|
||||
return Optional.ofNullable(s.get());
|
||||
} catch (Throwable t) {
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
public interface ThrowableSupplier<T> {
|
||||
T get() throws Throwable;
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
public interface ThrowableFunction<T, R> {
|
||||
R apply(T t) throws Throwable;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<parent>
|
||||
<artifactId>jef</artifactId>
|
||||
<groupId>jef</groupId>
|
||||
<version>0.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>core</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -4,8 +4,6 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
-1
@@ -5,7 +5,6 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@AllArgsConstructor
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
-1
@@ -5,7 +5,6 @@ import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Getter
|
||||
File renamed without changes.
@@ -0,0 +1,37 @@
|
||||
package jef.expressions;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode
|
||||
public class ConstantExpression implements Expression {
|
||||
public static final ConstantExpression V0 = new ConstantExpression(0);
|
||||
public static final ConstantExpression V1 = new ConstantExpression(1);
|
||||
public static final ConstantExpression V2 = new ConstantExpression(2);
|
||||
public static final ConstantExpression V3 = new ConstantExpression(3);
|
||||
public static final ConstantExpression V4 = new ConstantExpression(4);
|
||||
public static final ConstantExpression V5 = new ConstantExpression(5);
|
||||
|
||||
protected final Object value;
|
||||
|
||||
@Override
|
||||
public Type getType() {
|
||||
return Type.CONSTANT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Priority getPriority() {
|
||||
return Priority.CONSTANT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (value instanceof String) {
|
||||
return "\"" + value + "\"";
|
||||
}
|
||||
return value.toString();
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+4
-4
@@ -9,13 +9,13 @@ public class DatabaseSelectAllExpression implements Expression, SelectableExpres
|
||||
public static final DatabaseSelectAllExpression INSTANCE = new DatabaseSelectAllExpression();
|
||||
|
||||
@Override
|
||||
public Expression.Type getType() {
|
||||
return Expression.Type.CONSTANT;
|
||||
public Type getType() {
|
||||
return Type.CONSTANT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Expression.Priority getPriority() {
|
||||
return Expression.Priority.UNDEFINED;
|
||||
public Priority getPriority() {
|
||||
return Priority.UNDEFINED;
|
||||
}
|
||||
|
||||
@Override
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
-2
@@ -4,8 +4,6 @@ import jef.model.constraints.ForeignKeyConstraint;
|
||||
import jef.serializable.SerializableObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class ForeignKeyBuilder<T extends SerializableObject, R extends SerializableObject> {
|
||||
private final ForeignKeyConstraint foreignKey;
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
-2
@@ -1,8 +1,6 @@
|
||||
package jef.model.annotations.processors;
|
||||
|
||||
import jef.model.DbEntity;
|
||||
import jef.model.DbEntityBuilder;
|
||||
import jef.model.DbField;
|
||||
import jef.model.DbFieldBuilder;
|
||||
import jef.model.annotations.Index;
|
||||
import jef.model.constraints.IndexConstraint;
|
||||
-2
@@ -1,8 +1,6 @@
|
||||
package jef.model.annotations.processors;
|
||||
|
||||
import jef.model.DbEntity;
|
||||
import jef.model.DbEntityBuilder;
|
||||
import jef.model.DbField;
|
||||
import jef.model.DbFieldBuilder;
|
||||
import jef.model.annotations.Key;
|
||||
import jef.model.constraints.KeyConstraint;
|
||||
File renamed without changes.
File renamed without changes.
-1
@@ -8,7 +8,6 @@ import jef.serializable.SerializableObject;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class UniqueProcessor extends KeyProcessorBase<UniqueKeyConstraint, Unique> {
|
||||
public static final UniqueProcessor INSTANCE = new UniqueProcessor();
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
-2
@@ -3,8 +3,6 @@ package jef.model.migration.operation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class AddFieldOperation implements MigrationOperation {
|
||||
-1
@@ -5,7 +5,6 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
-1
@@ -3,7 +3,6 @@ package jef.model.migration.operation;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Getter
|
||||
public class AddIndexOperation extends AddKeyOperationBase {
|
||||
-1
@@ -3,7 +3,6 @@ package jef.model.migration.operation;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Getter
|
||||
public class AddKeyOperation extends AddKeyOperationBase {
|
||||
File renamed without changes.
-1
@@ -3,7 +3,6 @@ package jef.model.migration.operation;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Getter
|
||||
public class AddPrimaryKeyOperation extends AddKeyOperationBase {
|
||||
-1
@@ -4,7 +4,6 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
-1
@@ -3,7 +3,6 @@ package jef.model.migration.operation;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Getter
|
||||
public class AddUniqueKeyOperation extends AddKeyOperationBase {
|
||||
Loaded 100 of 200 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user