@Test public void loadWithNullReturnsNull() { Assert.assertNull(this.manager.load(null)); }
@Override public E load(DocumentModelBridge document) throws IllegalArgumentException { try { return getEntityConstructor().newInstance(document); } catch (IllegalArgumentException | InvocationTargetException ex) { this.logger.info("Tried to load invalid entity of type [{}] from document [{}]", getEntityXClassReference(), document == null ? null : document.getDocumentReference()); } catch (InstantiationException | IllegalAccessException ex) { this.logger.error("Failed to instantiate primary entity of type [{}] from document [{}]: {}", getEntityXClassReference(), document == null ? null : document.getDocumentReference(), ex.getMessage()); } return null; }
AbstractPrimaryEntityManager implements PrimaryEntityManager<E> { @Override public E load(DocumentModelBridge document) throws IllegalArgumentException { try { return getEntityConstructor().newInstance(document); } catch (IllegalArgumentException | InvocationTargetException ex) { this.logger.info("Tried to load invalid entity of type [{}] from document [{}]", getEntityXClassReference(), document == null ? null : document.getDocumentReference()); } catch (InstantiationException | IllegalAccessException ex) { this.logger.error("Failed to instantiate primary entity of type [{}] from document [{}]: {}", getEntityXClassReference(), document == null ? null : document.getDocumentReference(), ex.getMessage()); } return null; } }
AbstractPrimaryEntityManager implements PrimaryEntityManager<E> { @Override public E load(DocumentModelBridge document) throws IllegalArgumentException { try { return getEntityConstructor().newInstance(document); } catch (IllegalArgumentException | InvocationTargetException ex) { this.logger.info("Tried to load invalid entity of type [{}] from document [{}]", getEntityXClassReference(), document == null ? null : document.getDocumentReference()); } catch (InstantiationException | IllegalAccessException ex) { this.logger.error("Failed to instantiate primary entity of type [{}] from document [{}]: {}", getEntityXClassReference(), document == null ? null : document.getDocumentReference(), ex.getMessage()); } return null; }  }
AbstractPrimaryEntityManager implements PrimaryEntityManager<E> { @Override public E load(DocumentModelBridge document) throws IllegalArgumentException { try { return getEntityConstructor().newInstance(document); } catch (IllegalArgumentException | InvocationTargetException ex) { this.logger.info("Tried to load invalid entity of type [{}] from document [{}]", getEntityXClassReference(), document == null ? null : document.getDocumentReference()); } catch (InstantiationException | IllegalAccessException ex) { this.logger.error("Failed to instantiate primary entity of type [{}] from document [{}]: {}", getEntityXClassReference(), document == null ? null : document.getDocumentReference(), ex.getMessage()); } return null; }  @Override E create(); @Override synchronized E create(DocumentReference creator); @Override E get(String id); @Override E get(DocumentReference reference); @Override E getByName(String name); @Override Iterator<E> getAll(); @Override boolean delete(E entity); @Override E load(DocumentModelBridge document); @Override String getIdPrefix(); @Override EntityReference getEntityType(); }
AbstractPrimaryEntityManager implements PrimaryEntityManager<E> { @Override public E load(DocumentModelBridge document) throws IllegalArgumentException { try { return getEntityConstructor().newInstance(document); } catch (IllegalArgumentException | InvocationTargetException ex) { this.logger.info("Tried to load invalid entity of type [{}] from document [{}]", getEntityXClassReference(), document == null ? null : document.getDocumentReference()); } catch (InstantiationException | IllegalAccessException ex) { this.logger.error("Failed to instantiate primary entity of type [{}] from document [{}]: {}", getEntityXClassReference(), document == null ? null : document.getDocumentReference(), ex.getMessage()); } return null; }  @Override E create(); @Override synchronized E create(DocumentReference creator); @Override E get(String id); @Override E get(DocumentReference reference); @Override E getByName(String name); @Override Iterator<E> getAll(); @Override boolean delete(E entity); @Override E load(DocumentModelBridge document); @Override String getIdPrefix(); @Override EntityReference getEntityType();  }