@Test void testGetIntIdAttribute() { when(idAttribute.getDataType()).thenReturn(AttributeType.INT); EntityReference entityReference = new EntityReference(entityType, 123); assertEquals(valueOf(123), entityReference.getInt(ID_ATTR_NAME)); }
@Override public Integer getInt(String attributeName) { return (Integer) getIdValue(attributeName); }
EntityReference implements Entity { @Override public Integer getInt(String attributeName) { return (Integer) getIdValue(attributeName); } }
EntityReference implements Entity { @Override public Integer getInt(String attributeName) { return (Integer) getIdValue(attributeName); } EntityReference(EntityType entityType, Object id); }
EntityReference implements Entity { @Override public Integer getInt(String attributeName) { return (Integer) getIdValue(attributeName); } EntityReference(EntityType entityType, Object id); @Override EntityType getEntityType(); @Override Iterable<String> getAttributeNames(); @Override Object getIdValue(); @Override void setIdValue(Object id); @Override Object getLabelValue(); @Override Object get(String attributeName); @Override String getString(String attributeName); @Override Integer getInt(String attributeName); @Override Long getLong(String attributeName); @Override Boolean getBoolean(String attributeName); @Override Double getDouble(String attributeName); @Override Instant getInstant(String attributeName); @Override LocalDate getLocalDate(String attributeName); @Override Entity getEntity(String attributeName); @SuppressWarnings("unchecked") @Override E getEntity(String attributeName, Class<E> clazz); @SuppressWarnings("unchecked") @Override Iterable<Entity> getEntities(String attributeName); @SuppressWarnings("unchecked") @Override Iterable<E> getEntities(String attributeName, Class<E> clazz); @Override void set(String attributeName, Object value); @Override void set(Entity values); }
EntityReference implements Entity { @Override public Integer getInt(String attributeName) { return (Integer) getIdValue(attributeName); } EntityReference(EntityType entityType, Object id); @Override EntityType getEntityType(); @Override Iterable<String> getAttributeNames(); @Override Object getIdValue(); @Override void setIdValue(Object id); @Override Object getLabelValue(); @Override Object get(String attributeName); @Override String getString(String attributeName); @Override Integer getInt(String attributeName); @Override Long getLong(String attributeName); @Override Boolean getBoolean(String attributeName); @Override Double getDouble(String attributeName); @Override Instant getInstant(String attributeName); @Override LocalDate getLocalDate(String attributeName); @Override Entity getEntity(String attributeName); @SuppressWarnings("unchecked") @Override E getEntity(String attributeName, Class<E> clazz); @SuppressWarnings("unchecked") @Override Iterable<Entity> getEntities(String attributeName); @SuppressWarnings("unchecked") @Override Iterable<E> getEntities(String attributeName, Class<E> clazz); @Override void set(String attributeName, Object value); @Override void set(Entity values);  }