public ITracerObject getTableTracer(int elementId) { return traceTreeCache.get(elementId); }
public synchronized Vertex getVertex(String vertexName) { return vertices.get(vertexName); }
public ITracerObject getTableTracer(int elementId) { return traceTreeCache.get(elementId); }
public static RuntimeStack getLinuxRuntimeStackByJavaVersion(String javaVersion){ return runtimeStackMap.get(javaVersion); }
private String caliperEntityTypeToXapiObjectType(String caliperType) { String xapiType = objectEntityMap.get(caliperType); if (StringUtils.isBlank(xapiType)) { return caliperType; } return xapiType; }
private String caliperEntityTypeToXapiObjectType(String caliperType) { String xapiType = objectEntityMap.get(caliperType); if (StringUtils.isBlank(xapiType)) { return caliperType; } return xapiType; }
public PdfExtractLine getStringPdfExtractLine(int aPosition) { return extractLines.get(stringPositionMap.get(aPosition)); }
public File get(long fd) throws IOException { FileDescriptor fdObj = descriptors.get(fd); if (fdObj == null) throw new IOException("EBADF"); File f = files.get(fdObj); if (f == null) throw new IOException("EBADF"); return f; }
@Override public long getRowPK(int rowNumber) { if(!pk_name.isEmpty()) { return rowPk.get(rowNumber); } else { return Integer.valueOf(rowNumber).longValue(); } }
@Override public int findColumn(String label) throws SQLException { if(cachedColumnNames == null) { cacheColumnNames(); } Integer columnId = cachedColumnNames.get(label.toUpperCase()); if(columnId == null) { throw new SQLException("Column "+label+" does not exists"); } return columnId; }
public PricingTier toPricingTier() throws MojoExecutionException { if (pricingTierBidiMap.containsKey(pricingTier)) { return pricingTierBidiMap.get(pricingTier); } else { throw new MojoExecutionException("Unknown value of the pricingTier, please correct it in pom.xml."); } }
public PricingTier toPricingTier() throws MojoExecutionException { if (pricingTierBidiMap.containsKey(pricingTier)) { return pricingTierBidiMap.get(pricingTier); } else { throw new MojoExecutionException("Unknown value of the pricingTier, please correct it in pom.xml."); } }
private String caliperActionToXapiVerb(String caliperAction) { String verb = null; try { verb = verbActionMap.get(Action.valueOf(caliperAction)); if (StringUtils.isBlank(verb)) { return DEFAULT_XAPI_VERB; } } catch (IllegalArgumentException e) { return DEFAULT_XAPI_VERB; } return verb; }
private String caliperActionToXapiVerb(String caliperAction) { String verb = null; try { verb = verbActionMap.get(Action.valueOf(caliperAction)); if (StringUtils.isBlank(verb)) { return DEFAULT_XAPI_VERB; } } catch (IllegalArgumentException e) { return DEFAULT_XAPI_VERB; } return verb; }
public RuntimeStack getLinuxRuntime() throws MojoExecutionException { // todo: add unit tests if (StringUtils.equalsIgnoreCase(javaVersion, JRE_8)) { final String fixRuntime = StringUtils.isEmpty(webContainer) ? JRE_8 : webContainer; if (runtimeStackMap.containsKey(fixRuntime)) { return runtimeStackMap.get(fixRuntime); } else { throw new MojoExecutionException( String.format("Unknown value of <webContainer>. Supported values are %s.", StringUtils.join(runtimeStackMap.keySet(), ","))); } } throw new MojoExecutionException(String.format( "Unknown value of <javaVersion>. Supported values is %s", JRE_8)); }
@Override public int findColumn(String label) throws SQLException { if(cachedColumnNames == null) { cacheColumnNames(); } Integer columnId = cachedColumnNames.get(label); if(columnId == null) { // Search with insensitive case for(Map.Entry<String, Integer> entry : cachedColumnNames.entrySet()) { if(entry.getKey().equalsIgnoreCase(label)) { return entry.getValue(); } } throw new SQLException("Column "+label+" does not exists"); } return columnId; }
public void close(long fd) throws IOException { File f = get(fd); assert f instanceof org.kframework.krun.ioserver.filesystem.portable.File; ((org.kframework.krun.ioserver.filesystem.portable.File)f).close(); files.remove(descriptors.get(fd)); descriptors.remove(fd); }
@Override public Object decorate(String internalValue) { Object result = cache.get(internalValue); if (result == null && internalValue != null) {
protected void cacheColumnNames() throws SQLException { cachedColumnNames = new DualHashBidiMap<>(); cachedGeomColumnNames = new DualHashBidiMap<>(); try(Resource res = resultSetHolder.getResource()) { ResultSetMetaData meta = res.getResultSet().getMetaData(); for (int idColumn = 1; idColumn <= meta.getColumnCount(); idColumn++) { cachedColumnNames.put(meta.getColumnName(idColumn), idColumn); } if(excludeGeomFields) { List<String> geomFields = SFSUtilities.getGeometryFields(getConnection(), location); for (String geomField : geomFields) { cachedGeomColumnNames.put(geomField, cachedColumnNames.get(geomField)); } } } }
int pkColumnId = cachedColumnNames.get(pk_name); for(int updateColumn = 0; updateColumn < updateRow.length; updateColumn++) { TableUndoableUpdate update = updateRow[updateColumn];