List of usage examples for javax.xml.registry.infomodel PostalAddress hashCode
@HotSpotIntrinsicCandidate public native int hashCode();
From source file:it.cnr.icar.eric.client.ui.thin.RegistryObjectCollectionBean.java
private List<RegistryObjectBean> getPostalAddressesSearchResultsBeans(RegistryObjectBean roBean) throws ClassNotFoundException, NoSuchMethodException, ExceptionInInitializerError, Exception { Collection<?> postalAddresses = roBean.getPostalAddresses(); if (postalAddresses == null) { return null; }//from w ww .ja va 2 s . c o m int numPostalAddressObjects = postalAddresses.size(); @SuppressWarnings("unused") ArrayList<Object> list = new ArrayList<Object>(numPostalAddressObjects); Iterator<?> roItr = postalAddresses.iterator(); if (log.isDebugEnabled()) { log.debug("Query results: "); } String objectType = "PostalAddress"; int numCols = 2; // Replace ObjectType with Id. TODO - formalize this convention ArrayList<RegistryObjectBean> roBeans = new ArrayList<RegistryObjectBean>(numPostalAddressObjects); for (@SuppressWarnings("unused") int i = 0; roItr.hasNext(); i++) { PostalAddress postalAddress = (PostalAddress) roItr.next(); String header = null; Object columnValue = null; @SuppressWarnings("unused") ArrayList<Object> srvbHeader = new ArrayList<Object>(numCols); ArrayList<SearchResultValueBean> searchResultValueBeans = new ArrayList<SearchResultValueBean>(numCols); header = WebUIResourceBundle.getInstance().getString("Details"); columnValue = roBean.getId() + "." + postalAddress.hashCode(); searchResultValueBeans.add(new SearchResultValueBean(header, columnValue)); header = WebUIResourceBundle.getInstance().getString("Street Number"); columnValue = postalAddress.getStreetNumber(); searchResultValueBeans.add(new SearchResultValueBean(header, columnValue)); header = WebUIResourceBundle.getInstance().getString("Street"); columnValue = postalAddress.getStreet(); searchResultValueBeans.add(new SearchResultValueBean(header, columnValue)); header = WebUIResourceBundle.getInstance().getString("City"); columnValue = postalAddress.getCity(); searchResultValueBeans.add(new SearchResultValueBean(header, columnValue)); RegistryObjectBean srb = new RegistryObjectBean(searchResultValueBeans, roBean.getRegistryObject(), objectType, postalAddress, false); roBeans.add(srb); } return roBeans; }