List of usage examples for java.io Serializable toString
public String toString()
From source file:org.bremersee.pagebuilder.PageRequestBuilderImpl.java
protected String getQuery(final Serializable query) { return query == null ? null : query.toString(); }
From source file:org.codice.ddf.validator.metacard.wkt.MetacardWktValidator.java
private String getAttributeValue(Metacard metacard) { Attribute attribute = metacard.getAttribute(validatedAttributeKey); if (attribute == null) { return null; }/*from w w w. ja v a 2 s. co m*/ Serializable attributeValue = attribute.getValue(); return attributeValue == null ? null : attributeValue.toString(); }
From source file:com.manydesigns.portofino.shiro.AbstractPortofinoRealm.java
@Override public String getUserPrettyName(Serializable user) { return user.toString(); }
From source file:com.dasasian.chok.tool.ZkTool.java
public void read(String path) { Serializable data = zkClient.readData(path); System.out.println("from type: " + data.getClass().getName()); System.out.println("to string: " + data.toString()); }
From source file:org.excalibur.discovery.service.p2p.DiscoveryServiceImpl.java
@Override @SuppressWarnings({ "unchecked", "rawtypes" }) public <T> List<T> queryForResource(String name) throws Exception { List<T> result = new ArrayList<T>(); lock_.lock();//from www. ja v a 2 s . c o m try { Set<Serializable> resources = overlay_.retrieve(new StringKey(checkNotNull(name))); for (Serializable resource : resources) { ResourceDetails r = mapper.readValue(resource.toString().getBytes(), ResourceDetails.class); JAXBContextFactory factory = new JAXBContextFactory(r.getType()); result.add((T) factory.unmarshal(r.getPayload())); } } finally { lock_.unlock(); } return result; }
From source file:net.sf.katta.tool.ZkTool.java
public void read(String path) { Serializable data = _zkClient.readData(path); System.out.println("from type: " + data.getClass().getName()); System.out.println("to string: " + data.toString()); }
From source file:de.ingrid.interfaces.csw.mapping.impl.CSWRecordCache.java
/** * Get the record id from the given cache id * //from w ww . j a v a 2 s . co m * @param cacheId * @return Serializable */ protected Serializable getRecordIdFromCacheId(Serializable cacheId) { if (cacheId != null) { int pos = cacheId.toString().lastIndexOf("_"); return cacheId.toString().substring(0, pos); } else { throw new IllegalArgumentException("Id argument must not be null"); } }
From source file:de.ingrid.interfaces.csw.mapping.impl.CSWRecordCache.java
/** * Get the element set name from the given cache id * /* www . j ava2 s . c o m*/ * @param cacheId * @return ElementSetName */ protected ElementSetName getElementSetNameFromCacheId(Serializable cacheId) { if (cacheId != null) { int pos = cacheId.toString().lastIndexOf("_"); String elementSetNameStr = cacheId.toString().substring(pos + 1).toUpperCase(); return ElementSetName.valueOf(elementSetNameStr); } else { throw new IllegalArgumentException("Id argument must not be null"); } }
From source file:de.ingrid.interfaces.csw.index.impl.LuceneIndexer.java
@Override public void removeDocs(Set<Serializable> records) throws Exception { if (this.configurationProvider != null) { File indexPath = this.configurationProvider.getIndexPath(); IngridGeoTKLuceneIndexer geoTKIndexer = new IngridGeoTKLuceneIndexer("", indexPath, null, this.statusProvider); for (Serializable record : records) { geoTKIndexer.removeDocument(record.toString()); }/*from ww w . j a va2 s.c om*/ geoTKIndexer.optimize(); geoTKIndexer.destroy(); } }
From source file:org.sipfoundry.sipxconfig.common.profile.UserProfileDecorator.java
public void decorateEntity(Object entity, Serializable id) { if (entity instanceof User) { try {/*from w ww .j a v a2 s. c om*/ User user = (User) entity; UserProfile profile = m_userProfileService.getUserProfile(id.toString()); if (profile != null) { user.setUserProfile(profile); } } catch (Exception ex) { LOG.error("failed to retrieve user profile " + ex.getMessage()); } } }