diff --git a/src/main/java/tech/ailef/dbadmin/external/controller/DataExportController.java b/src/main/java/tech/ailef/dbadmin/external/controller/DataExportController.java index 010b376..26c253e 100644 --- a/src/main/java/tech/ailef/dbadmin/external/controller/DataExportController.java +++ b/src/main/java/tech/ailef/dbadmin/external/controller/DataExportController.java @@ -1,6 +1,5 @@ /* * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps - * Copyright (C) 2023 Ailef (http://ailef.tech) * * This program is free software: you can redistribute it and/or modify diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/BigDecimalFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/BigDecimalFieldType.java index 17bd0fe..25f05ff 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/BigDecimalFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/BigDecimalFieldType.java @@ -1,3 +1,21 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; import java.math.BigDecimal; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/BigIntegerFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/BigIntegerFieldType.java index 5958db7..6893c69 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/BigIntegerFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/BigIntegerFieldType.java @@ -1,3 +1,21 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; import java.math.BigInteger; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/BooleanFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/BooleanFieldType.java index 3a9af32..8c2a405 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/BooleanFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/BooleanFieldType.java @@ -1,3 +1,21 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; import java.util.List; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ByteArrayFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ByteArrayFieldType.java index 45eec3e..fa3a085 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ByteArrayFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ByteArrayFieldType.java @@ -1,4 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; + import java.io.IOException; import java.util.List; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ByteFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ByteFieldType.java index f4e037d..8481b90 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ByteFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ByteFieldType.java @@ -1,3 +1,21 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; import java.util.List; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/CharFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/CharFieldType.java index 098ba04..2a4ac6b 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/CharFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/CharFieldType.java @@ -1,3 +1,22 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + package tech.ailef.dbadmin.external.dbmapping.fields; import java.util.List; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ComputedFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ComputedFieldType.java index 5677f06..7e39b56 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ComputedFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ComputedFieldType.java @@ -1,3 +1,21 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; import java.util.List; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/DateFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/DateFieldType.java index 28d4ba6..bf74161 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/DateFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/DateFieldType.java @@ -1,3 +1,21 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; import java.text.ParseException; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/DoubleFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/DoubleFieldType.java index 7ccc3b2..5198119 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/DoubleFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/DoubleFieldType.java @@ -1,3 +1,21 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; import java.util.List; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/EnumFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/EnumFieldType.java index c8d4d91..dd2666e 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/EnumFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/EnumFieldType.java @@ -1,3 +1,21 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; import java.lang.reflect.InvocationTargetException; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/FloatFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/FloatFieldType.java index 1ed19f4..bd724a0 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/FloatFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/FloatFieldType.java @@ -1,4 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; + import java.util.List; import tech.ailef.dbadmin.external.dto.CompareOperator; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/InstantFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/InstantFieldType.java index e55209c..b294f9c 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/InstantFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/InstantFieldType.java @@ -1,3 +1,21 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; import java.time.Instant; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/IntegerFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/IntegerFieldType.java index c4739a4..b7cab39 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/IntegerFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/IntegerFieldType.java @@ -1,4 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; + import java.util.List; import tech.ailef.dbadmin.external.dto.CompareOperator; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/LocalDateFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/LocalDateFieldType.java index ee1ab46..7095322 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/LocalDateFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/LocalDateFieldType.java @@ -1,4 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; + import java.time.LocalDate; import java.util.List; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/LocalDateTimeFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/LocalDateTimeFieldType.java index 52a2add..4c08286 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/LocalDateTimeFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/LocalDateTimeFieldType.java @@ -1,3 +1,21 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; import java.time.LocalDateTime; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/LongFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/LongFieldType.java index ba8ffee..9eb7813 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/LongFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/LongFieldType.java @@ -1,4 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; + import java.util.List; import tech.ailef.dbadmin.external.dto.CompareOperator; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ManyToManyFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ManyToManyFieldType.java index 82b10ec..e7e00a1 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ManyToManyFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ManyToManyFieldType.java @@ -1,4 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; + import java.util.List; import jakarta.persistence.ManyToMany; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/OffsetDateTimeFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/OffsetDateTimeFieldType.java index 0f8be6f..e53664e 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/OffsetDateTimeFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/OffsetDateTimeFieldType.java @@ -1,4 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; + import java.time.OffsetDateTime; import java.util.List; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/OldDbFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/OldDbFieldType.java deleted file mode 100644 index dc70d5d..0000000 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/OldDbFieldType.java +++ /dev/null @@ -1,695 +0,0 @@ -///* -// * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps -// * Copyright (C) 2023 Ailef (http://ailef.tech) -// * -// * This program is free software: you can redistribute it and/or modify -// * it under the terms of the GNU General Public License as published by -// * the Free Software Foundation, either version 3 of the License, or -// * (at your option) any later version. -// * -// * This program is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// * GNU General Public License for more details. -// * -// * You should have received a copy of the GNU General Public License -// * along with this program. If not, see . -// */ -// -// -//package tech.ailef.dbadmin.external.dbmapping; -// -//import java.io.IOException; -//import java.lang.reflect.InvocationTargetException; -//import java.lang.reflect.Method; -//import java.math.BigDecimal; -//import java.math.BigInteger; -//import java.sql.Date; -//import java.text.ParseException; -//import java.text.SimpleDateFormat; -//import java.time.Instant; -//import java.time.LocalDate; -//import java.time.LocalDateTime; -//import java.time.OffsetDateTime; -//import java.time.ZoneOffset; -//import java.util.List; -//import java.util.Locale; -// -//import org.springframework.web.multipart.MultipartFile; -// -//import jakarta.persistence.ManyToMany; -//import jakarta.persistence.OneToMany; -//import jakarta.persistence.OneToOne; -//import tech.ailef.dbadmin.external.dto.CompareOperator; -//import tech.ailef.dbadmin.external.exceptions.DbAdminException; -//import tech.ailef.dbadmin.external.exceptions.UnsupportedFieldTypeException; -// -///** -// * The enum for supported database field types. -// */ -//public enum OldDbFieldType { -// BIG_INTEGER { -// @Override -// public String getFragmentName() { -// return "number"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// return new BigInteger(value.toString()); -// } -// -// @Override -// public Class getJavaClass() { -// return BigInteger.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.GT, CompareOperator.EQ, CompareOperator.LT); -// } -// }, -// INTEGER { -// @Override -// public String getFragmentName() { -// return "number"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// return Integer.parseInt(value.toString()); -// } -// -// @Override -// public Class getJavaClass() { -// return Integer.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.GT, CompareOperator.EQ, CompareOperator.LT); -// } -// }, -// DOUBLE { -// @Override -// public String getFragmentName() { -// return "number"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// return Double.parseDouble(value.toString()); -// } -// -// @Override -// public Class getJavaClass() { -// return Double.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.GT, CompareOperator.EQ, CompareOperator.LT); -// } -// }, -// LONG { -// @Override -// public String getFragmentName() { -// return "number"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// return Long.parseLong(value.toString()); -// } -// -// @Override -// public Class getJavaClass() { -// return Long.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.GT, CompareOperator.EQ, CompareOperator.LT); -// } -// }, -// FLOAT { -// @Override -// public String getFragmentName() { -// return "number"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// return Float.parseFloat(value.toString()); -// } -// -// @Override -// public Class getJavaClass() { -// return Float.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.GT, CompareOperator.EQ, CompareOperator.LT); -// } -// }, -// OFFSET_DATE_TIME { -// @Override -// public String getFragmentName() { -// return "datetime"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// return OffsetDateTime.parse(value.toString()); -// } -// -// @Override -// public Class getJavaClass() { -// return OffsetDateTime.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.AFTER, CompareOperator.STRING_EQ, CompareOperator.BEFORE); -// } -// -// }, -// DATE { -// @Override -// public String getFragmentName() { -// return "date"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy", Locale.ENGLISH); -// try { -// return format.parse(value.toString()); -// } catch (ParseException e) { -// throw new RuntimeException(e); -// } -// } -// -// @Override -// public Class getJavaClass() { -// return Date.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.AFTER, CompareOperator.STRING_EQ, CompareOperator.BEFORE); -// } -// }, -// LOCAL_DATE { -// @Override -// public String getFragmentName() { -// return "date"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// return LocalDate.parse(value.toString()); -// } -// -// @Override -// public Class getJavaClass() { -// return Float.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.AFTER, CompareOperator.STRING_EQ, CompareOperator.BEFORE); -// } -// }, -// LOCAL_DATE_TIME { -// @Override -// public String getFragmentName() { -// return "datetime"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// return LocalDateTime.parse(value.toString()); -// } -// -// @Override -// public Class getJavaClass() { -// return LocalDateTime.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.AFTER, CompareOperator.STRING_EQ, CompareOperator.BEFORE); -// } -// }, -// INSTANT { -// @Override -// public String getFragmentName() { -// return "datetime"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// return LocalDateTime.parse(value.toString()).toInstant(ZoneOffset.UTC); -// } -// -// @Override -// public Class getJavaClass() { -// return Instant.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.AFTER, CompareOperator.STRING_EQ, CompareOperator.BEFORE); -// } -// }, -// STRING { -// @Override -// public String getFragmentName() { -// return "text"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// return value.toString(); -// } -// -// @Override -// public Class getJavaClass() { -// return String.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.CONTAINS, CompareOperator.STRING_EQ); -// } -// }, -// TEXT { -// @Override -// public String getFragmentName() { -// return "textarea"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// return value.toString(); -// } -// -// @Override -// public Class getJavaClass() { -// return String.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.CONTAINS, CompareOperator.STRING_EQ); -// } -// -// }, -// BOOLEAN { -// @Override -// public String getFragmentName() { -// return "text"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// return Boolean.parseBoolean(value.toString()); -// } -// -// @Override -// public Class getJavaClass() { -// return Boolean.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.EQ); -// } -// }, -// BIG_DECIMAL { -// @Override -// public String getFragmentName() { -// return "number"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// return new BigDecimal(value.toString()); -// } -// -// @Override -// public Class getJavaClass() { -// return BigDecimal.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.GT, CompareOperator.EQ, CompareOperator.LT); -// } -// }, -// CHAR { -// @Override -// public String getFragmentName() { -// return "char"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// if (value.toString().isBlank()) return null; -// return value.toString().charAt(0); -// } -// -// @Override -// public Class getJavaClass() { -// return char.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.STRING_EQ); -// } -// }, -// BYTE { -// @Override -// public String getFragmentName() { -// return "number"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// return value.toString().getBytes()[0]; -// } -// -// @Override -// public Class getJavaClass() { -// return byte.class; -// } -// -// @Override -// public List getCompareOperators() { -// throw new DbAdminException("Binary fields are not comparable"); -// } -// }, -// BYTE_ARRAY { -// @Override -// public String getFragmentName() { -// return "file"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// try { -// return ((MultipartFile)value).getBytes(); -// } catch (IOException e) { -// throw new DbAdminException(e); -// } -// } -// -// @Override -// public Class getJavaClass() { -// return byte[].class; -// } -// -// @Override -// public List getCompareOperators() { -// throw new DbAdminException("Binary fields are not comparable"); -// } -// }, -// UUID { -// @Override -// public String getFragmentName() { -// return "text"; -// } -// -// @Override -// public Object parseValue(Object value) { -// return java.util.UUID.fromString(value.toString()); -// } -// -// @Override -// public Class getJavaClass() { -// return java.util.UUID.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.STRING_EQ, CompareOperator.CONTAINS); -// } -// -// }, -// ENUM_STRING { -// @Override -// public String getFragmentName() { -// return "text"; -// } -// -// @Override -// public Object parseValue(Object value) { -// if (value == null || value.toString().isBlank()) return null; -// try { -// Method valueOf = getJavaClass().getMethod("valueOf", String.class); -// return valueOf.invoke(null, value.toString()); -// } catch (NoSuchMethodException | SecurityException | IllegalAccessException -// | IllegalArgumentException | InvocationTargetException e) { -// throw new DbAdminException(e); -// } -// } -// -// @Override -// public Class getJavaClass() { -// return Enum.class; -// } -// -// @Override -// public List getCompareOperators() { -// return List.of(CompareOperator.STRING_EQ); -// } -// -// }, -// ONE_TO_MANY { -// @Override -// public String getFragmentName() { -// throw new UnsupportedOperationException(); -// } -// -// @Override -// public Object parseValue(Object value) { -// throw new UnsupportedOperationException(); -// } -// -// @Override -// public Class getJavaClass() { -// return OneToMany.class; -// } -// -// @Override -// public boolean isRelationship() { -// return true; -// } -// -// @Override -// public String toString() { -// return "One to Many"; -// } -// -// @Override -// public List getCompareOperators() { -// throw new DbAdminException(); -// } -// }, -// ONE_TO_ONE { -// @Override -// public String getFragmentName() { -// throw new UnsupportedOperationException(); -// } -// -// @Override -// public Object parseValue(Object value) { -// throw new UnsupportedOperationException(); -// } -// -// @Override -// public Class getJavaClass() { -// return OneToOne.class; -// } -// -// @Override -// public boolean isRelationship() { -// return true; -// } -// -// @Override -// public String toString() { -// return "One to One"; -// } -// -// @Override -// public List getCompareOperators() { -// throw new DbAdminException(); -// } -// }, -// MANY_TO_MANY { -// @Override -// public String getFragmentName() { -// throw new UnsupportedOperationException(); -// } -// -// @Override -// public Object parseValue(Object value) { -// throw new UnsupportedOperationException(); -// } -// -// @Override -// public Class getJavaClass() { -// return ManyToMany.class; -// } -// -// @Override -// public boolean isRelationship() { -// return true; -// } -// -// @Override -// public String toString() { -// return "Many to Many"; -// } -// -// @Override -// public List getCompareOperators() { -// throw new DbAdminException(); -// } -// }, -// COMPUTED { -// @Override -// public String getFragmentName() { -// throw new UnsupportedOperationException(); -// } -// -// @Override -// public Object parseValue(Object value) { -// throw new UnsupportedOperationException(); -// } -// -// @Override -// public Class getJavaClass() { -// throw new UnsupportedOperationException(); -// } -// -// @Override -// public List getCompareOperators() { -// throw new DbAdminException(); -// } -// }; -// -// /** -// * Returns the name of the Thymeleaf fragments in the 'inputs.html' -// * file, used to render an input field for this specific type. -// * For example, a fragment using a file input is used for binary fields. -// */ -// public abstract String getFragmentName(); -// -// /** -// * Parse the value received through an HTML form into a instance -// * of an object of this specific type. This usually involves a conversion -// * from string, but, for example, files are sent as MultipartFile instead. -// * @param value the value to parse -// * @return -// */ -// public abstract Object parseValue(Object value); -// -// /** -// * Returns the Java class corresponding to this field type. -// * @return -// */ -// public abstract Class getJavaClass(); -// -// /** -// * Returns a list of compare operators that can be used to compare -// * two values for this field type. Used in the faceted search to provide -// * more operators than just equality (e.g. after/before for dates). -// * @return -// */ -// public abstract List getCompareOperators(); -// -// public boolean isRelationship() { -// return false; -// } -// -//// private DbFieldType() { -//// -//// } -//// -//// private DbFieldType(String className) { -//// this.className = className; -//// } -//// -//// private String className; -// -// /** -// * Returns the corresponding {@linkplain DbFieldType} from a Class object. -// * @param klass -// * @return -// */ -// public static DbFieldType fromClass(Class klass) { -// if (klass == Boolean.class || klass == boolean.class) { -// return BOOLEAN; -// } else if (klass == Long.class || klass == long.class) { -// return LONG; -// } else if (klass == Integer.class || klass == int.class) { -// return INTEGER; -// } else if (klass == BigInteger.class) { -// return BIG_INTEGER; -// } else if (klass == Short.class || klass == short.class) { -// return SHORT; -// } else if (klass == String.class) { -// return STRING; -// } else if (klass == LocalDate.class) { -// return LOCAL_DATE; -// } else if (klass == Date.class) { -// return DATE; -// } else if (klass == LocalDateTime.class) { -// return LOCAL_DATE_TIME; -// } else if (klass == Instant.class) { -// return INSTANT; -// } else if (klass == Float.class || klass == float.class) { -// return FLOAT; -// } else if (klass == Double.class || klass == double.class) { -// return DOUBLE; -// } else if (klass == BigDecimal.class) { -// return BIG_DECIMAL; -// } else if (klass == byte[].class) { -// return BYTE_ARRAY; -// } else if (klass == OffsetDateTime.class) { -// return OFFSET_DATE_TIME; -// } else if (klass == byte.class || klass == Byte.class) { -// return BYTE; -// } else if (klass == java.util.UUID.class) { -// return UUID; -// } else if (klass == char.class || klass == Character.class) { -// return CHAR; -// } else if (Enum.class.isAssignableFrom(klass)) { -// return ENUM_STRING; -// } else { -// throw new UnsupportedFieldTypeException("Unsupported field type: " + klass); -// } -// } -//} \ No newline at end of file diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/OneToManyFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/OneToManyFieldType.java index fccfcd4..385343b 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/OneToManyFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/OneToManyFieldType.java @@ -1,3 +1,21 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; import java.util.List; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/OneToOneFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/OneToOneFieldType.java index 2b283b5..c695a76 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/OneToOneFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/OneToOneFieldType.java @@ -1,4 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; + import java.util.List; import jakarta.persistence.OneToOne; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ShortFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ShortFieldType.java index 1b4f1a6..cf4746d 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ShortFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/ShortFieldType.java @@ -1,3 +1,21 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; import java.util.List; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/StringFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/StringFieldType.java index 53719fb..036b455 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/StringFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/StringFieldType.java @@ -1,4 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; + import java.util.List; import tech.ailef.dbadmin.external.dto.CompareOperator; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/TextFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/TextFieldType.java index be2a752..39fa984 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/TextFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/TextFieldType.java @@ -1,3 +1,21 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; import java.util.List; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/UUIDFieldType.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/UUIDFieldType.java index 12c13e0..7e041b5 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/UUIDFieldType.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/fields/UUIDFieldType.java @@ -1,3 +1,21 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package tech.ailef.dbadmin.external.dbmapping.fields; import java.util.List;