EntryImpl extends RelationalChildRestrictedObject implements Entry { @Override public Vdb getParent( final UnitOfWork transaction ) throws KException { ArgCheck.isNotNull( transaction, "transaction" ); ArgCheck.isTrue( ( transaction.getState() == State.NOT_STARTED ), "transaction state must be NOT_STARTED" ); final KomodoObject grouping = super.getParent( transaction ); final Vdb result = Vdb.RESOLVER.resolve( transaction, grouping.getParent( transaction ) ); return result; } EntryImpl( final UnitOfWork uow,
                      final Repository repository,
                      final String workspacePath ); @Override KomodoType getTypeIdentifier(UnitOfWork uow); @Override String getDescription( final UnitOfWork uow ); @Override Vdb getParent( final UnitOfWork transaction ); @Override String getPath( final UnitOfWork uow ); @Override int getTypeId(); @Override void setDescription( final UnitOfWork uow,
                                final String newDescription ); @Override void setPath( final UnitOfWork uow,
                         final String newPath );  }
@Test public void shouldFailConstructionIfNotEntry() { if ( RelationalObjectImpl.VALIDATE_INITIAL_STATE ) { try { new EntryImpl( getTransaction(), _repo, this.entry.getParent( getTransaction() ).getAbsolutePath() ); fail(); } catch ( final KException e ) { } } }
@Test public void shouldHaveParentVdb() throws Exception { assertThat( this.entry.getParent( getTransaction() ), is( instanceOf( Vdb.class ) ) ); }