DescribeGlobalSObjectResult o = dgr.getSobjects()[i]; if ( ( OnlyQueryableObjects && o.isQueryable() ) || !OnlyQueryableObjects ) { objects.add( o.getName() );
protected List<NamedThing> getSchemaNames(PartnerConnection connection) throws IOException { List<NamedThing> returnList = new ArrayList<>(); DescribeGlobalResult result = null; try { result = connection.describeGlobal(); } catch (ConnectionException e) { throw new ComponentException(e); } DescribeGlobalSObjectResult[] objects = result.getSobjects(); for (DescribeGlobalSObjectResult obj : objects) { LOG.debug("module label: " + obj.getLabel() + " name: " + obj.getName()); returnList.add(new SimpleNamedThing(obj.getName(), obj.getLabel())); } return returnList; }
public static List<NamedThing> getSchemaNames(PartnerConnection connection) throws IOException { List<NamedThing> returnList = new ArrayList<>(); DescribeGlobalResult result = null; try { result = connection.describeGlobal(); } catch (ConnectionException e) { throw new ComponentException(e); } DescribeGlobalSObjectResult[] objects = result.getSobjects(); for (DescribeGlobalSObjectResult obj : objects) { LOG.debug("module label: " + obj.getLabel() + " name: " + obj.getName()); returnList.add(new SimpleNamedThing(obj.getName(), obj.getLabel())); } return returnList; }
protected List<NamedThing> getSchemaNames(PartnerConnection connection) throws IOException { List<NamedThing> returnList = new ArrayList<>(); DescribeGlobalResult result = null; try { result = connection.describeGlobal(); } catch (ConnectionException e) { throw new ComponentException(e); } DescribeGlobalSObjectResult[] objects = result.getSobjects(); for (DescribeGlobalSObjectResult obj : objects) { LOG.debug("module label: " + obj.getLabel() + " name: " + obj.getName()); returnList.add(new SimpleNamedThing(obj.getName(), obj.getLabel())); } return returnList; }
protected List<NamedThing> getSchemaNames(PartnerConnection connection) throws IOException { List<NamedThing> returnList = new ArrayList<>(); DescribeGlobalResult result = null; try { result = connection.describeGlobal(); } catch (ConnectionException e) { throw new ComponentException(e); } DescribeGlobalSObjectResult[] objects = result.getSobjects(); for (DescribeGlobalSObjectResult obj : objects) { LOG.debug("module label: " + obj.getLabel() + " name: " + obj.getName()); returnList.add(new SimpleNamedThing(obj.getName(), obj.getLabel())); } return returnList; }
public static List<NamedThing> getSchemaNames(PartnerConnection connection) throws IOException { List<NamedThing> returnList = new ArrayList<>(); DescribeGlobalResult result = null; try { result = connection.describeGlobal(); } catch (ConnectionException e) { throw new ComponentException(e); } DescribeGlobalSObjectResult[] objects = result.getSobjects(); for (DescribeGlobalSObjectResult obj : objects) { LOG.debug("module label: " + obj.getLabel() + " name: " + obj.getName()); returnList.add(new SimpleNamedThing(obj.getName(), obj.getLabel())); } return returnList; }
private void addTable(DescribeGlobalSObjectResult objectMetadata) { String name = objectMetadata.getName(); if (normalizeNames) { name = NameUtil.normalizeName(name); } if (!allowedToAdd(name)) { return; } Table table = metadataFactory.addTable(name); FullyQualifiedName fqn = new FullyQualifiedName("sobject", objectMetadata.getName()); //$NON-NLS-1$ table.setProperty(FQN, fqn.toString()); table.setNameInSource(objectMetadata.getName()); tableMap.put(objectMetadata.getName(), table); table.setProperty(TABLE_CUSTOM, String.valueOf(objectMetadata.isCustom())); table.setProperty(TABLE_SUPPORTS_CREATE, String.valueOf(objectMetadata.isCreateable())); table.setProperty(TABLE_SUPPORTS_DELETE, String.valueOf(objectMetadata.isDeletable())); table.setProperty(TABLE_SUPPORTS_MERGE, String.valueOf(objectMetadata.isMergeable())); table.setProperty(TABLE_SUPPORTS_QUERY, String.valueOf(objectMetadata.isQueryable())); table.setProperty(TABLE_SUPPORTS_REPLICATE, String.valueOf(objectMetadata.isReplicateable())); table.setProperty(TABLE_SUPPORTS_RETRIEVE, String.valueOf(objectMetadata.isRetrieveable())); table.setProperty(TABLE_SUPPORTS_SEARCH, String.valueOf(objectMetadata.isSearchable())); }
@Override protected List<Table> fetch() { final List<Table> result = new ArrayList<Table>(); final DescribeGlobalResult describeGlobal; try { describeGlobal = _connection.describeGlobal(); } catch (ConnectionException e) { throw SalesforceUtils.wrapException(e, "Failed to invoke describeGlobal service"); } for (final DescribeGlobalSObjectResult sobject : describeGlobal.getSobjects()) { if (sobject.isQueryable() && sobject.isUpdateable()) { final String tableName = sobject.getName(); final String tableLabel = sobject.getLabel(); final Table table = new SalesforceTable(tableName, tableLabel, SalesforceSchema.this, _connection); result.add(table); } } return result; } };
@Override protected List<Table> fetch() { final List<Table> result = new ArrayList<Table>(); final DescribeGlobalResult describeGlobal; try { describeGlobal = _connection.describeGlobal(); } catch (ConnectionException e) { throw SalesforceUtils.wrapException(e, "Failed to invoke describeGlobal service"); } for (final DescribeGlobalSObjectResult sobject : describeGlobal.getSobjects()) { if (sobject.isQueryable() && sobject.isUpdateable()) { final String tableName = sobject.getName(); final String tableLabel = sobject.getLabel(); final Table table = new SalesforceTable(tableName, tableLabel, SalesforceSchema.this, _connection); result.add(table); } } return result; } };
@Override protected List<Table> fetch() { final List<Table> result = new ArrayList<Table>(); final DescribeGlobalResult describeGlobal; try { describeGlobal = _connection.describeGlobal(); } catch (ConnectionException e) { throw SalesforceUtils.wrapException(e, "Failed to invoke describeGlobal service"); } for (final DescribeGlobalSObjectResult sobject : describeGlobal.getSobjects()) { if (sobject.isQueryable() && sobject.isUpdateable()) { final String tableName = sobject.getName(); final String tableLabel = sobject.getLabel(); final Table table = new SalesforceTable(tableName, tableLabel, SalesforceSchema.this, _connection); result.add(table); } } return result; } };
allOrgObjectNames.add(dgsr.getName());