Examples of fetchSpecification()


Examples of com.webobjects.eoaccess.EODatabaseDataSource.fetchSpecification()

  @Override
  public void setDataSource(EODataSource eodatasource) {
    EODatabaseDataSource ds = (eodatasource instanceof EODatabaseDataSource) ? (EODatabaseDataSource) eodatasource : null;
    Object newDataSourceState = null;
    if (ds != null) {
      newDataSourceState = ds.fetchSpecification().toString().replaceAll("\\n", "") + ":" + ds.fetchSpecificationForFetch().toString().replaceAll("\\n", "") + " fetchLimit: " + ds.fetchSpecification().fetchLimit() + ", " + ds.fetchSpecificationForFetch().fetchLimit();
    }
    EODataSource old = displayGroup().dataSource();
    super.setDataSource(eodatasource);
    displayGroup().setDataSource(eodatasource);
    if (ds == null || (dataSourceState == null) || (dataSourceState != null && !dataSourceState.equals(newDataSourceState)) || alwaysRefetchList()) {
View Full Code Here

Examples of com.webobjects.eoaccess.EODatabaseDataSource.fetchSpecification()

  @Override
  public void setDataSource(EODataSource eodatasource) {
    EODatabaseDataSource ds = (eodatasource instanceof EODatabaseDataSource) ? (EODatabaseDataSource) eodatasource : null;
    Object newDataSourceState = null;
    if (ds != null) {
      newDataSourceState = ds.fetchSpecification().toString().replaceAll("\\n", "") + ":" + ds.fetchSpecificationForFetch().toString().replaceAll("\\n", "") + " fetchLimit: " + ds.fetchSpecification().fetchLimit() + ", " + ds.fetchSpecificationForFetch().fetchLimit();
    }
    EODataSource old = displayGroup().dataSource();
    super.setDataSource(eodatasource);
    displayGroup().setDataSource(eodatasource);
    if (ds == null || (dataSourceState == null) || (dataSourceState != null && !dataSourceState.equals(newDataSourceState)) || alwaysRefetchList()) {
View Full Code Here

Examples of com.webobjects.eoaccess.EODatabaseDataSource.fetchSpecification()

            QueryPageInterface qpi=(QueryPageInterface)sender;
            EODataSource eds=qpi.queryDataSource();
            if (eds!=null) {
                if (eds instanceof EODatabaseDataSource) {
                    EODatabaseDataSource dbds=(EODatabaseDataSource)eds;
                    EOQualifier q=dbds.fetchSpecification().qualifier();
                    log.debug("Setting qualifier to "+q);
                    _displayGroup.setQualifier(q);
                    _displayGroup.updateDisplayedObjects();
                } else {
                    log.warn("Data source of unknown type: "+eds.getClass().getName());
View Full Code Here

Examples of com.webobjects.eoaccess.EODatabaseDataSource.fetchSpecification()

    public WOComponent showList() {
        ListPageInterface nextPage = (ListPageInterface) D2W.factory().pageForConfigurationNamed("ListAjaxBug", session());
        EODatabaseDataSource ds = new EODatabaseDataSource(session().defaultEditingContext(), "Bug");
        ds.setFetchSpecification(new EOFetchSpecification("Bug", null, null));
        ds.fetchSpecification().setFetchLimit(5);
        nextPage.setDataSource(ds);
        return (WOComponent) nextPage;
    }
}
View Full Code Here

Examples of com.webobjects.eoaccess.EODatabaseDataSource.fetchSpecification()

    }


    public void getObjects(){
        EODatabaseDataSource ds = new EODatabaseDataSource(defaultEditingContext(), "Movie");
        EOFetchSpecification fs = ds.fetchSpecification();
        fs.setPrefetchingRelationshipKeyPaths(new NSArray("studio"));
        _objects = ds.fetchObjects();
        System.out.println("getRawRows: objects: "+ _objects.count());
    }
View Full Code Here

Examples of com.webobjects.eoaccess.EODatabaseDataSource.fetchSpecification()

    // belongs into ERXEC, but I'm reluctant to have this morphing done
    // every time a fetch occurs as it affects mainly sort ordering
    // from the display group
    if (dataSource() instanceof EODatabaseDataSource) {
      EODatabaseDataSource ds = (EODatabaseDataSource) dataSource();
      EOFetchSpecification old = ds.fetchSpecification();
      EOFetchSpecification fs = ERXEOAccessUtilities.localizeFetchSpecification(ds.editingContext(), old);
      ds.setFetchSpecification(fs);
      try {
        result = super.fetch();
      } finally {
View Full Code Here

Examples of com.webobjects.eoaccess.EODatabaseDataSource.fetchSpecification()

        attribArray3 = (NSArray)m.objectForKey("AttributeDef");
        log.debug("critArray3: "+ critArray3);
    }
    public void getObjects(){
        EODatabaseDataSource ds = new EODatabaseDataSource(defaultEditingContext(),"Movie");
        EOFetchSpecification fs = ds.fetchSpecification();
        fs.setPrefetchingRelationshipKeyPaths(new NSArray("studio"));
        objects = ds.fetchObjects();
        log.debug("getRawRows: objects: "+ objects.count());
    }
    public void getRawRows(){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.