org.teamapps.pojo.template.UdbEntityView.txt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of universal-db Show documentation
Show all versions of universal-db Show documentation
Ultra fast TeamApps database
package {package};
import org.teamapps.universaldb.*;
import org.teamapps.universaldb.index.*;
import org.teamapps.universaldb.index.numeric.*;
import org.teamapps.universaldb.index.text.*;
import org.teamapps.universaldb.index.translation.*;
import org.teamapps.universaldb.index.bool.*;
import org.teamapps.universaldb.index.file.*;
import org.teamapps.universaldb.index.reference.multi.*;
import org.teamapps.universaldb.index.reference.single.*;
import org.teamapps.universaldb.index.binary.*;
import org.teamapps.universaldb.pojo.*;
import org.teamapps.universaldb.pojo.template.*;
import org.teamapps.universaldb.record.*;
import org.teamapps.universaldb.context.*;
import org.teamapps.universaldb.index.transaction.request.*;
import java.util.*;
import java.time.*;
import java.io.*;
import java.util.concurrent.*;
import java.util.function.Supplier;
{imports}
public class {udbType} extends AbstractUdbEntity<{type}> implements {type} {
{staticFields}
private static void setTableIndex(TableIndex tableIndex, UniversalDB udb) {
universalDB = udb;
table = tableIndex;
{staticFieldSetters}
}
public static List<{type}> getAll() {
return new EntityBitSetList<>({type}.getBuilder(), table.getRecordBitSet());
}
public static List<{type}> sort(List<{type}> list, String sortFieldName, boolean ascending, UserContext userContext, String ... path) {
return sort(table, list, sortFieldName, ascending, userContext, path);
}
public static List<{type}> sort(BitSet recordIds, String sortFieldName, boolean ascending, UserContext userContext, String ... path) {
return sort(table, {type}.getBuilder(), recordIds, sortFieldName, ascending, userContext, path);
}
public static int getCount() {
return table.getCount();
}
public {udbType}() {
super(table);
}
public {udbType}(int id, boolean createEntity) {
super(table, id, createEntity);
}
@Override
public {type} build() {
return new {udbType}();
}
@Override
public {type} build(int id) {
return new {udbType}(id, false);
}
{methods}
@Override
public {udbType} save() {
throw new UnsupportedOperationException();
}
@Override
public void delete() {
throw new UnsupportedOperationException();
}
@Override
public void restoreDeleted() {
throw new UnsupportedOperationException();
}
@Override
public {udbType} save(int userId, long timestamp) {
throw new UnsupportedOperationException();
}
@Override
public void delete(int userId, long timestamp) {
throw new UnsupportedOperationException();
}
@Override
public void restoreDeleted(int userId, long timestamp) {
throw new UnsupportedOperationException();
}
}