traceIn();\r
contextPool = new ContextPool();\r
\r
- // try {\r
- // getItemTypes();\r
- // } catch (Exception e) {\r
- // logger.error("Can't load item types. System message is: {}", e.getMessage());\r
- // }\r
+ // try {\r
+ // getItemTypes();\r
+ // } catch (Exception e) {\r
+ // logger.error("Can't load item types. System message is: {}", e.getMessage());\r
+ // }\r
\r
traceOut();\r
}\r
\r
@Override\r
- public FileType createFileType(String name, String description, String videoCodec, String audioCodec, int videoTracks, int audioTracks, float frameRate) {\r
+ public FileType createFileType(String name, String description, String videoCodec, String audioCodec,\r
+ int videoTracks, int audioTracks, float frameRate) {\r
traceIn();\r
FileType entity = new FileType();\r
entity.setPersister(this);\r
}\r
\r
@Override\r
- public Metadata createMetadata(MetadataElement mde, ListType listType, GuiType guiType, String sqlField, StaticTables staticTable, String pojoField,\r
- MdType... flags) {\r
+ public Metadata createMetadata(MetadataElement mde, ListType listType, GuiType guiType, String sqlField,\r
+ StaticTables staticTable, String pojoField, MdType... flags) {\r
traceIn();\r
Metadata entity = new Metadata();\r
int values = MdType.getValues(flags);\r
}\r
\r
@Override\r
- public MetadataType createMetadataType(String name, BaseType baseType, String javaType, String dataType, int length) {\r
+ public MetadataType createMetadataType(String name, BaseType baseType, String javaType, String dataType,\r
+ int length) {\r
traceIn();\r
MetadataType entity = new MetadataType();\r
entity.setPersister(this);\r
}\r
\r
@Override\r
- public StoreUri createStoreUri(RemoteStoreProtocol protocol, String uri, int portNumber, boolean isStream, boolean isSource, boolean isTarget,\r
- String userName, String password, String rootPath) {\r
+ public StoreUri createStoreUri(RemoteStoreProtocol protocol, String uri, int portNumber, boolean isStream,\r
+ boolean isSource, boolean isTarget, String userName, String password, String rootPath) {\r
traceIn();\r
StoreUri entity = new StoreUri();\r
entity.setPersister(this);\r
\r
@Override\r
public StoreUri createStoreUri(URI uri) {\r
- StoreUri result = createStoreUri(RemoteStoreProtocol.fromString(uri.toString()), uri.getHost(), uri.getPort(), false, false, false, null, null, null);\r
+ StoreUri result = createStoreUri(RemoteStoreProtocol.fromString(uri.toString()), uri.getHost(), uri.getPort(),\r
+ false, false, false, null, null, null);\r
result.setCurrentPath(uri.getPath());\r
return result;\r
}\r
}\r
\r
@Override\r
- public WorkflowAction createWorkflowAction(Timestamp touched, Timestamp started, Timestamp finished, boolean successful, String houseId, String description,\r
- String source, String destination, String tag, long size) {\r
+ public WorkflowAction createWorkflowAction(Timestamp touched, Timestamp started, Timestamp finished,\r
+ boolean successful, String houseId, String description, String source, String destination, String tag,\r
+ long size) {\r
traceIn();\r
\r
WorkflowAction entity = new WorkflowAction();\r
}\r
\r
@Override\r
- public StoreUri ensureUri(String storeName, String uri, boolean isSystem, boolean isLowres, RemoteStoreProtocol protocol) {\r
+ public StoreUri ensureUri(String storeName, String uri, boolean isSystem, boolean isLowres,\r
+ RemoteStoreProtocol protocol) {\r
Store store = getStore(storeName);\r
StoreUri result = null;\r
if (store == null) {\r
}\r
\r
@Override\r
- public void executeQuery(Connection connection, String query, IResultSetConsumer consumer, IStatementDecorator decorator) {\r
+ public void executeQuery(Connection connection, String query, IResultSetConsumer consumer,\r
+ IStatementDecorator decorator) {\r
ResultSet rs = null;\r
PreparedStatement st = null;\r
try {\r
- //st = connection.prepareStatement(query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\r
- // rs.last();\r
- // int size = rs.getRow();\r
- // rs.beforeFirst();\r
+ // st = connection.prepareStatement(query, ResultSet.TYPE_SCROLL_INSENSITIVE,\r
+ // ResultSet.CONCUR_READ_ONLY);\r
+ // rs.last();\r
+ // int size = rs.getRow();\r
+ // rs.beforeFirst();\r
\r
st = connection.prepareStatement(query);\r
if (decorator != null)\r
}\r
\r
@Override\r
- public int executeUpdate(Connection connection, String query, IStatementDecorator decorator, IResultSetConsumer keysConsumer) {\r
+ public int executeUpdate(Connection connection, String query, IStatementDecorator decorator,\r
+ IResultSetConsumer keysConsumer) {\r
int result = -1;\r
PreparedStatement st = null;\r
ResultSet rs = null;\r
return result;\r
}\r
\r
- //a map miatt az ID-k elerhetoek\r
+ // a map miatt az ID-k elerhetoek\r
@Override\r
public TreeMap<String, Long> getAllTags() {\r
TreeMap<String, Long> result = new TreeMap<>();\r
Store sysLowres = getSystemStore(true);\r
StoreUri lowresUri = selectLowresUri(sysLowres);\r
if (lowresUri == null) {\r
- //az elsodlegesen tul keves a hely\r
+ // az elsodlegesen tul keves a hely\r
StoreDAO dao = (StoreDAO) getBaseDAO(Store.class);\r
List<Store> stores = ListUtils.cast(dao.getAll());\r
for (Store store : stores) {\r
- //kompatibilitas miatt ez maradt\r
+ // kompatibilitas miatt ez maradt\r
if (store.isLowres() || store.isSystem())\r
continue;\r
lowresUri = selectLowresUri(store);\r
} else\r
result = sysLowres;\r
\r
- //nincs mas\r
+ // nincs mas\r
if (result == null)\r
result = sysLowres;\r
return result;\r
try {\r
String date = df.format(scheduleDate.getTime());\r
String query = String.format(\r
- "SELECT COUNT(*) as count, SUM(size) as duration FROM VW_RD_INGEST WHERE houseid='%s' AND finished LIKE '%s%%' GROUP BY houseid", houseId,\r
- date);\r
+ "SELECT COUNT(*) as count, SUM(size) as duration FROM VW_RD_INGEST WHERE houseid='%s' AND finished LIKE '%s%%' GROUP BY houseid",\r
+ houseId, date);\r
st = connection.prepareStatement(query);\r
rs = st.executeQuery();\r
if (rs.next()) {\r
Calendar end = CalendarUtils.createZeroCalendar(date);\r
end.add(Calendar.DAY_OF_YEAR, 1);\r
WorkflowActionDAO dao = (WorkflowActionDAO) getBaseDAO(WorkflowAction.class);\r
- return (List<WorkflowAction>) (List<?>) dao.getWorkflowActions(new Timestamp(begin.getTimeInMillis()), new Timestamp(end.getTimeInMillis()));\r
+ return (List<WorkflowAction>) (List<?>) dao.getWorkflowActions(new Timestamp(begin.getTimeInMillis()),\r
+ new Timestamp(end.getTimeInMillis()));\r
}\r
\r
void initialize() {\r
return result;\r
}\r
\r
- //min 5 GB szabad hely eseten ad vissza LOCAL uri-t\r
+ // min. 5 GB szabad hely eseten ad vissza LOCAL uri-t\r
public StoreUri selectLowresUri(Store store) throws Exception {\r
StoreUri result = null;\r
List<StoreUri> uris = store.getStoreUris();\r
if (uris != null && uris.size() > 1) {\r
- uris = uris.stream().filter(u -> u.getProtocol() == RemoteStoreProtocol.LOCAL && u.isTarget()).sorted((u1, u2) -> {\r
- return Integer.compare(u1.getPriority(), u2.getPriority());\r
- }).collect(Collectors.toList());\r
+ uris = uris.stream().filter(u -> u.getProtocol() == RemoteStoreProtocol.LOCAL && u.isTarget())\r
+ .sorted((u1, u2) -> {\r
+ return Integer.compare(u1.getPriority(), u2.getPriority());\r
+ }).collect(Collectors.toList());\r
\r
for (StoreUri uri : uris) {\r
- //min 5GB\r
+ // min 5GB\r
if (FileSystemUtils.freeSpaceKb(uri.toString(true)) > 5000000) {\r
result = uri;\r
break;\r
message = e.getClass().getName();\r
StackTraceElement element = Thread.currentThread().getStackTrace()[2];\r
message += String.format(", source: %1$s.%2$s", element.getClassName(), element.getMethodName());\r
- // if (logger != null)\r
- // logger.error(message, e);\r
+ // if (logger != null)\r
+ // logger.error(message, e);\r
throw new ItemManagerException(message);\r
}\r
}\r