private static String createEntryKey(final EntityInfoAggregator entityInfo, final Map<String, Object> data) throws EntityProviderException { final List<EntityPropertyInfo> keyPropertyInfos = entityInfo.getKeyPropertyInfos(); StringBuilder keys = new StringBuilder(); for (final EntityPropertyInfo keyPropertyInfo : keyPropertyInfos) { if (keys.length() > 0) { keys.append(','); } final String name = keyPropertyInfo.getName(); if (keyPropertyInfos.size() > 1) { keys.append(Encoder.encode(name)).append('='); } final EdmSimpleType type = (EdmSimpleType) keyPropertyInfo.getType(); try { keys.append(Encoder.encode(type.valueToString(data.get(name), EdmLiteralKind.URI, keyPropertyInfo.getFacets()))); } catch (final EdmSimpleTypeException e) { throw new EntityProviderProducerException( EdmSimpleTypeException.getMessageReference(e.getMessageReference()). updateContent(e.getMessageReference().getContent(), name), e); } } return keys.toString(); }
private static String createEntryKey(final EntityInfoAggregator entityInfo, final Map<String, Object> data) throws EntityProviderException { final List<EntityPropertyInfo> keyPropertyInfos = entityInfo.getKeyPropertyInfos(); StringBuilder keys = new StringBuilder(); for (final EntityPropertyInfo keyPropertyInfo : keyPropertyInfos) { if (keys.length() > 0) { keys.append(','); } final String name = keyPropertyInfo.getName(); if (keyPropertyInfos.size() > 1) { keys.append(Encoder.encode(name)).append('='); } final EdmSimpleType type = (EdmSimpleType) keyPropertyInfo.getType(); try { keys.append(Encoder.encode(type.valueToString(data.get(name), EdmLiteralKind.URI, keyPropertyInfo.getFacets()))); } catch (final EdmSimpleTypeException e) { throw new EntityProviderProducerException( EdmSimpleTypeException.getMessageReference(e.getMessageReference()). updateContent(e.getMessageReference().getContent(), name), e); } } return keys.toString(); }
throw new EntityProviderProducerException( EdmSimpleTypeException.getMessageReference(e.getMessageReference()). updateContent(e.getMessageReference().getContent(), titleInfo.getName()), e);
throw new EntityProviderProducerException( EdmSimpleTypeException.getMessageReference(e.getMessageReference()). updateContent(e.getMessageReference().getContent(), titleInfo.getName()), e);
} catch (EdmSimpleTypeException e) { throw new EntityProviderProducerException(EdmSimpleTypeException.getMessageReference( e.getMessageReference()).updateContent(e.getMessageReference().getContent(), titleInfo.getName()), e);
throw new EntityProviderProducerException( EdmSimpleTypeException.getMessageReference(e.getMessageReference()). updateContent(e.getMessageReference().getContent(), name), e);
String getUpdatedString(final EntityInfoAggregator eia, final Map<String, Object> data) throws EdmSimpleTypeException, EntityProviderProducerException { Object updateDate = null; EdmFacets updateFacets = null; EntityPropertyInfo updatedInfo = eia.getTargetPathInfo(EdmTargetPath.SYNDICATION_UPDATED); if (updatedInfo != null) { updateDate = data.get(updatedInfo.getName()); if (updateDate != null) { updateFacets = updatedInfo.getFacets(); } } if (updateDate == null) { updateDate = new Date(); } try { return EdmDateTimeOffset.getInstance().valueToString(updateDate, EdmLiteralKind.DEFAULT, updateFacets); } catch (final EdmSimpleTypeException e) { throw new EntityProviderProducerException( EdmSimpleTypeException.getMessageReference(e.getMessageReference()). updateContent(e.getMessageReference().getContent(), updatedInfo == null ? null : updatedInfo.getName()), e); } }
String getUpdatedString(final EntityInfoAggregator eia, final Map<String, Object> data) throws EdmSimpleTypeException, EntityProviderProducerException { Object updateDate = null; EdmFacets updateFacets = null; EntityPropertyInfo updatedInfo = eia.getTargetPathInfo(EdmTargetPath.SYNDICATION_UPDATED); if (updatedInfo != null) { updateDate = data.get(updatedInfo.getName()); if (updateDate != null) { updateFacets = updatedInfo.getFacets(); } } if (updateDate == null) { updateDate = new Date(); } try { return EdmDateTimeOffset.getInstance().valueToString(updateDate, EdmLiteralKind.DEFAULT, updateFacets); } catch (final EdmSimpleTypeException e) { throw new EntityProviderProducerException( EdmSimpleTypeException.getMessageReference(e.getMessageReference()). updateContent(e.getMessageReference().getContent(), updatedInfo != null ? updatedInfo.getName() : null), e); } }
String getUpdatedString(final EntityInfoAggregator eia, final Map<String, Object> data) throws EdmSimpleTypeException, EntityProviderProducerException { Object updateDate = null; EdmFacets updateFacets = null; EntityPropertyInfo updatedInfo = eia.getTargetPathInfo(EdmTargetPath.SYNDICATION_UPDATED); if (updatedInfo != null) { updateDate = data.get(updatedInfo.getName()); if (updateDate != null) { updateFacets = updatedInfo.getFacets(); } } if (updateDate == null) { updateDate = new Date(); } try { return EdmDateTimeOffset.getInstance().valueToString(updateDate, EdmLiteralKind.DEFAULT, updateFacets); } catch (final EdmSimpleTypeException e) { throw new EntityProviderProducerException( EdmSimpleTypeException.getMessageReference(e.getMessageReference()). updateContent(e.getMessageReference().getContent(), updatedInfo != null ? updatedInfo.getName() : null), e); } }
private String getTargetPathValue(final EntityInfoAggregator eia, final String targetPath, final Map<String, Object> data) throws EntityProviderException { EntityPropertyInfo info = null; try { info = eia.getTargetPathInfo(targetPath); if (info != null) { EdmSimpleType type = (EdmSimpleType) info.getType(); Object value = data.get(info.getName()); return type.valueToString(value, EdmLiteralKind.DEFAULT, info.getFacets()); } return null; } catch (final EdmSimpleTypeException e) { throw new EntityProviderProducerException( EdmSimpleTypeException.getMessageReference(e.getMessageReference()). updateContent(e.getMessageReference().getContent(), info.getName()), e); } }
private String getTargetPathValue(final EntityInfoAggregator eia, final String targetPath, final Map<String, Object> data) throws EntityProviderException { EntityPropertyInfo info = null; try { info = eia.getTargetPathInfo(targetPath); if (info != null) { EdmSimpleType type = (EdmSimpleType) info.getType(); Object value = data.get(info.getName()); return type.valueToString(value, EdmLiteralKind.DEFAULT, info.getFacets()); } return null; } catch (final EdmSimpleTypeException e) { throw new EntityProviderProducerException( EdmSimpleTypeException.getMessageReference(e.getMessageReference()). updateContent(e.getMessageReference().getContent(), info.getName()), e); } }
private String getTargetPathValue(final EntityInfoAggregator eia, final String targetPath, final Map<String, Object> data) throws EntityProviderException { EntityPropertyInfo info = null; try { info = eia.getTargetPathInfo(targetPath); if (info != null) { EdmSimpleType type = (EdmSimpleType) info.getType(); Object value = data.get(info.getName()); return type.valueToString(value, EdmLiteralKind.DEFAULT, info.getFacets()); } return null; } catch (final EdmSimpleTypeException e) { throw new EntityProviderProducerException( EdmSimpleTypeException.getMessageReference(e.getMessageReference()). updateContent(e.getMessageReference().getContent(), info.getName()), e); } }
} catch (EdmSimpleTypeException e) { throw new EntityProviderProducerException(EdmSimpleTypeException.getMessageReference( e.getMessageReference()).updateContent(e.getMessageReference().getContent(), propertyName), e);
} catch (EdmSimpleTypeException e) { throw new EntityProviderProducerException(EdmSimpleTypeException.getMessageReference( e.getMessageReference()).updateContent(e.getMessageReference().getContent(), propertyName), e);
} catch (EdmSimpleTypeException e) { throw new EntityProviderProducerException(EdmSimpleTypeException.getMessageReference( e.getMessageReference()).updateContent( e.getMessageReference().getContent(), prop.getName()), e);
} catch (EdmSimpleTypeException e) { throw new EntityProviderProducerException(EdmSimpleTypeException.getMessageReference( e.getMessageReference()).updateContent( e.getMessageReference().getContent(), prop.getName()), e);
} catch (EdmSimpleTypeException e) { throw new EntityProviderProducerException(EdmSimpleTypeException.getMessageReference( e.getMessageReference()).updateContent( e.getMessageReference().getContent(), prop.getName()), e);
} catch (EdmSimpleTypeException e) { throw new EntityProviderProducerException(EdmSimpleTypeException.getMessageReference( e.getMessageReference()).updateContent(e.getMessageReference().getContent(), edmProperty.getName()), e);
} catch (EdmSimpleTypeException e) { throw new EntityProviderProducerException(EdmSimpleTypeException.getMessageReference( e.getMessageReference()).updateContent(e.getMessageReference().getContent(), propertyInfo.getName()), e);
} catch (EdmSimpleTypeException e) { throw new EntityProviderProducerException(EdmSimpleTypeException.getMessageReference( e.getMessageReference()).updateContent(e.getMessageReference().getContent(), edmProperty.getName()), e);