/* (non-Javadoc)
@see com.impetus.kundera.loader.ClientFactory#getSchemaManager(java.util.Map)
764352
@Override
    public SchemaManager getSchemaManager(Map<String, Object> externalProperty)
    {
        if (schemaManager == null)
        {
            initializePropertyReader();
            schemaManager = new CassandraSchemaManager(ThriftClientFactory.class.getName(), externalProperties,
                    kunderaMetadata);
        }
        return schemaManager;
    }
804014
private org.ehcache.CacheManager getEhcacheManager() {
        try {
            final Field f = eh107CacheManager.getClass().getDeclaredField("ehCacheManager");
            f.setAccessible(true);

            return (org.ehcache.CacheManager) f.get(eh107CacheManager);
        } catch (final IllegalAccessException e) {
            throw new RuntimeException(e);
        } catch (final NoSuchFieldException e) {
            throw new RuntimeException(e);
        }
    }
156831
public ResultSet getImportedKeysUsingInformationSchema(String catalog, String table)
      throws SQLException {
    if (table == null) {
      throw new SQLException("'table' parameter in getImportedKeys cannot be null");
    }
    String sql =
        "SELECT KCU.REFERENCED_TABLE_SCHEMA PKTABLE_CAT, NULL PKTABLE_SCHEM,  KCU.REFERENCED_TABLE_NAME PKTABLE_NAME,"
            + " KCU.REFERENCED_COLUMN_NAME PKCOLUMN_NAME, KCU.TABLE_SCHEMA FKTABLE_CAT, NULL FKTABLE_SCHEM, "
            + " KCU.TABLE_NAME FKTABLE_NAME, KCU.COLUMN_NAME FKCOLUMN_NAME, KCU.POSITION_IN_UNIQUE_CONSTRAINT KEY_SEQ,"
            + " CASE update_rule "
            + "   WHEN 'RESTRICT' THEN 1"
            + "   WHEN 'NO ACTION' THEN 3"
            + "   WHEN 'CASCADE' THEN 0"
            + "   WHEN 'SET NULL' THEN 2"
            + "   WHEN 'SET DEFAULT' THEN 4"
            + " END UPDATE_RULE,"
            + " CASE DELETE_RULE"
            + "  WHEN 'RESTRICT' THEN 1"
            + "  WHEN 'NO ACTION' THEN 3"
            + "  WHEN 'CASCADE' THEN 0"
            + "  WHEN 'SET NULL' THEN 2"
            + "  WHEN 'SET DEFAULT' THEN 4"
            + " END DELETE_RULE,"
            + " RC.CONSTRAINT_NAME FK_NAME,"
            + " NULL PK_NAME,"
            + importedKeyNotDeferrable + " DEFERRABILITY"
            + " FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE KCU"
            + " INNER JOIN INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS RC"
            + " ON KCU.CONSTRAINT_SCHEMA = RC.CONSTRAINT_SCHEMA"
            + " AND KCU.CONSTRAINT_NAME = RC.CONSTRAINT_NAME"
            + " WHERE "
            + catalogCond("KCU.TABLE_SCHEMA", catalog)
            + " AND "
            + " KCU.TABLE_NAME = " + escapeQuote(table)
            + " ORDER BY PKTABLE_CAT, PKTABLE_SCHEM, PKTABLE_NAME, KEY_SEQ";

    return executeQuery(sql);
  }
527334
private synchronized JsonSchema getInputPathJsonSchema() throws IOException {
        if (inputPathJsonSchema == null) {
            // No need to query Hadoop more than once as this shouldn't change mid-run,
            // thus, we can lazily initialize and cache the result.
            inputPathJsonSchema = HadoopUtils.getSchemaFromPath(getInputPath());
        }
        return inputPathJsonSchema;
    }
354197
@Override
    public EntityManager getEntityManager
                    (JPAPuId puId,
                     J2EEName j2eeName, // d510184
                     String refName, // d510184
                     boolean isExtendedContextType,
                     boolean isUnsynchronized,
                     Map<?, ?> properties)
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "getEntityManager : " + puId + ", " + j2eeName);

        EntityManager em = null;
        JPAPUnitInfo puInfo = findPersistenceUnitInfo(puId);
        if (puInfo != null)
        {
            em = isExtendedContextType ?
                            getJPARuntime().createJPAExEntityManager(puId, puInfo, j2eeName, refName, properties, isUnsynchronized, this) :
                            getJPARuntime().createJPATxEntityManager(puId, puInfo, j2eeName, refName, properties, isUnsynchronized, this);
        }
        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "getEntityManager : " + em);
        return em;

    }
514019
public ArrayList<SchemaField> getSchema()
    {
        final ArrayList<SchemaField> items = new ArrayList<SchemaField>(schemaFields.values());

        Collections.sort(items, new Comparator<SchemaField>()
        {
            @Override
            public int compare(final SchemaField left, final SchemaField right)
            {
                return left.getId() - right.getId();
            }
        });

        return items;
    }
669108
private static ProtobufMetadataManagerImpl getProtobufMetadataManager(EmbeddedCacheManager cacheManager) {
      if (cacheManager == null) {
         throw new IllegalArgumentException("cacheManager cannot be null");
      }
      ProtobufMetadataManagerImpl metadataManager = (ProtobufMetadataManagerImpl) cacheManager.getGlobalComponentRegistry().getComponent(ProtobufMetadataManager.class);
      if (metadataManager == null) {
         throw new IllegalStateException("ProtobufMetadataManager not initialised yet!");
      }
      return metadataManager;
   }
272177
public function getSchemaManager(){
        if($this->schemamanger == null){
            $this->schemamanger = new common_persistence_sql_pdo_mysql_SchemaManager($this);
        }
        return $this->schemamanger;
    }
829714
public Schema getIntermediateSchema(String schemaName) {
		Integer id = getSchemaIdByName(schemaName);
		return (id == null) ? null : schemas.get(id);
	}
757847
public String getSchemaName(String name) {
        return name == null ? currentSchema.name
                            : database.schemaManager.getSchemaName(name);
    }
359971
public function getSchemaManager(){
        if($this->schemamanger == null){
            $this->schemamanger = new common_persistence_sql_pdo_pgsql_SchemaManager($this);
        }
        return $this->schemamanger;
    }
817418
@Override
    public EntityManager createEntityManager()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "createEntityManager : " + this);

        EntityManager em = getEntityManager(false, false);
        JPAPooledEntityManager pem = new JPAPooledEntityManager(this, em, ivAbstractJpaComponent, true);
        return pem;
    }
992010
protected EntityManagerFactory lookupEntityManagerFactory(OpenEntityManager openEntityManager) {
        String emfBeanName = openEntityManager.name();
        String puName = openEntityManager.unitName();
        if (StringUtils.hasLength(emfBeanName)) {
            return this.applicationContext.getBean(emfBeanName, EntityManagerFactory.class);
        } else if (!StringUtils.hasLength(puName)
                && this.applicationContext.containsBean(
                        OpenEntityManagerInViewFilter.DEFAULT_ENTITY_MANAGER_FACTORY_BEAN_NAME)) {
            return this.applicationContext.getBean(
                    OpenEntityManagerInViewFilter.DEFAULT_ENTITY_MANAGER_FACTORY_BEAN_NAME,
                    EntityManagerFactory.class);
        } else {
            // Includes fallback search for single EntityManagerFactory bean by type.
            return EntityManagerFactoryUtils.findEntityManagerFactory(
                    this.applicationContext, puName);
        }
    }
701715
@Override
    public SchemaManager getSchemaManager(Map<String, Object> puProperties)
    {
        setExternalProperties(puProperties);
        if (schemaManager == null)
        {
            initializePropertyReader();
            schemaManager = new CouchDBSchemaManager(this.getClass().getName(), puProperties, this.kunderaMetadata);
        }
        return schemaManager;
    }
733274
static void loadSchemas(MessageStore msgStore, long[] schemaIds) throws MessageRestoreFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "loadSchemas");
    try {
      // Get the SchemaStore reference, creating a new one if necessary
      SchemaStoreItemStream schemaStore = getSchemaStore(msgStore);

      // Check for any unknown schemas
      for (int i = 0; i < schemaIds.length; i++) {
        if (JMFRegistry.instance.retrieve(schemaIds[i]) == null) {
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Restoring schema:" + schemaIds[i]);
          JMFRegistry.instance.register(schemaStore.findSchema(schemaIds[i]));
        }
      }
    } catch (MessageStoreException e) {
      FFDCFilter.processException(e, "loadSchemas", "105");
      throw new MessageRestoreFailedException(e);
    } catch (JMFException e) {
      FFDCFilter.processException(e, "loadSchemas", "108");
      throw new MessageRestoreFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "loadSchemas");
  }
377388
public Schema getSchema() {
    if (this.partition.isPresent()) {
      String schemaString = this.partition.get().get(SchemaBasedWriterPartitioner.SCHEMA_STRING).toString();
      this.withSchema(new Schema.Parser().parse(schemaString));
      return this.schema;
    } else {
      return null;
    }
  }
1142187
@Override
    public String getScheme() {
        // if it hasn't been set yet, then check whether the SC is secure
        // or not and set the value accordingly
        if (null == this.myScheme) {
            initScheme();
        }
        if (null == this.myScheme) { // if the request has been already destroyed then it will be still null
            return null;
        }
        return this.myScheme.getName();
    }