MCPcopy Create free account
hub / github.com/wyouflf/xUtils3 / getTable

Method getTable

xutils/src/main/java/org/xutils/db/table/DbBase.java:20–38  ·  view source on GitHub ↗
(Class<T> entityType)

Source from the content-addressed store, hash-verified

18 private final HashMap<Class<?>, TableEntity<?>> tableMap = new HashMap<Class<?>, TableEntity<?>>();
19
20 @Override
21 @SuppressWarnings("unchecked")
22 public <T> TableEntity<T> getTable(Class<T> entityType) throws DbException {
23 synchronized (tableMap) {
24 TableEntity<T> table = (TableEntity<T>) tableMap.get(entityType);
25 if (table == null) {
26 try {
27 table = new TableEntity<T>(this, entityType);
28 } catch (DbException ex) {
29 throw ex;
30 } catch (Throwable ex) {
31 throw new DbException(ex);
32 }
33 tableMap.put(entityType, table);
34 }
35
36 return table;
37 }
38 }
39
40 @Override
41 public void dropTable(Class<?> entityType) throws DbException {

Callers 2

dropTableMethod · 0.95
addColumnMethod · 0.95

Calls 2

getMethod · 0.65
putMethod · 0.45

Tested by

no test coverage detected