public void createGenFile( GenKbAuthorization Authorization,
		GenKbGenFileBuff Buff )
	{
		GenKbGenItemPKey pkey = schema.getFactoryGenItem().newPKey();

		pkey.setClassCode( Buff.getClassCode() );

		pkey.setRequiredCartridgeId( Buff.getRequiredCartridgeId() );
		pkey.setRequiredItemId( Buff.getRequiredItemId() );

		GenKbGenFileBySrcBundleIdxKey keySrcBundleIdx = schema.getFactoryGenFile().newSrcBundleIdxKey();
		keySrcBundleIdx.setRequiredCartridgeId( Buff.getRequiredCartridgeId() );
		keySrcBundleIdx.setOptionalSourceBundleGelId( Buff.getOptionalSourceBundleGelId() );

		GenKbGenFileByBasePackageIdxKey keyBasePackageIdx = schema.getFactoryGenFile().newBasePackageIdxKey();
		keyBasePackageIdx.setRequiredCartridgeId( Buff.getRequiredCartridgeId() );
		keyBasePackageIdx.setOptionalBasePackageGelId( Buff.getOptionalBasePackageGelId() );

		GenKbGenFileBySubPackageIdxKey keySubPackageIdx = schema.getFactoryGenFile().newSubPackageIdxKey();
		keySubPackageIdx.setRequiredCartridgeId( Buff.getRequiredCartridgeId() );
		keySubPackageIdx.setOptionalSubPackageGelId( Buff.getOptionalSubPackageGelId() );

		GenKbGenFileByExpClassIdxKey keyExpClassIdx = schema.getFactoryGenFile().newExpClassIdxKey();
		keyExpClassIdx.setRequiredCartridgeId( Buff.getRequiredCartridgeId() );
		keyExpClassIdx.setOptionalExpansionClassNameGelId( Buff.getOptionalExpansionClassNameGelId() );

		GenKbGenFileByExpKeyNameIdxKey keyExpKeyNameIdx = schema.getFactoryGenFile().newExpKeyNameIdxKey();
		keyExpKeyNameIdx.setRequiredCartridgeId( Buff.getRequiredCartridgeId() );
		keyExpKeyNameIdx.setOptionalExpansionKeyNameGelId( Buff.getOptionalExpansionKeyNameGelId() );

		GenKbGenFileByExpFileNameIdxKey keyExpFileNameIdx = schema.getFactoryGenFile().newExpFileNameIdxKey();
		keyExpFileNameIdx.setRequiredCartridgeId( Buff.getRequiredCartridgeId() );
		keyExpFileNameIdx.setOptionalExpansionFileNameGelId( Buff.getOptionalExpansionFileNameGelId() );

		// Validate unique indexes

		if( dictByPKey.containsKey( pkey ) ) {
			throw CFLib.getDefaultExceptionFactory().newPrimaryKeyNotNewException( getClass(), "createGenFile", pkey );
		}

		// Validate foreign keys

		{
			boolean allNull = true;
			allNull = false;
			allNull = false;
			if( ! allNull ) {
				if( null == schema.getTableGenRule().readDerivedByItemIdIdx( Authorization,
						Buff.getRequiredCartridgeId(),
						Buff.getRequiredItemId() ) )
				{
					throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException( getClass(),
						"createGenFile",
						"Superclass",
						"SuperClass",
						"GenRule",
						null );
				}
			}
		}

		// Proceed with adding the new record

		dictByPKey.put( pkey, Buff );

		SortedMap< GenKbGenItemPKey, GenKbGenFileBuff > subdictSrcBundleIdx;
		if( dictBySrcBundleIdx.containsKey( keySrcBundleIdx ) ) {
			subdictSrcBundleIdx = dictBySrcBundleIdx.get( keySrcBundleIdx );
		}
		else {
			subdictSrcBundleIdx = new TreeMap< GenKbGenItemPKey, GenKbGenFileBuff >();
			dictBySrcBundleIdx.put( keySrcBundleIdx, subdictSrcBundleIdx );
		}
		subdictSrcBundleIdx.put( pkey, Buff );

		SortedMap< GenKbGenItemPKey, GenKbGenFileBuff > subdictBasePackageIdx;
		if( dictByBasePackageIdx.containsKey( keyBasePackageIdx ) ) {
			subdictBasePackageIdx = dictByBasePackageIdx.get( keyBasePackageIdx );
		}
		else {
			subdictBasePackageIdx = new TreeMap< GenKbGenItemPKey, GenKbGenFileBuff >();
			dictByBasePackageIdx.put( keyBasePackageIdx, subdictBasePackageIdx );
		}
		subdictBasePackageIdx.put( pkey, Buff );

		SortedMap< GenKbGenItemPKey, GenKbGenFileBuff > subdictSubPackageIdx;
		if( dictBySubPackageIdx.containsKey( keySubPackageIdx ) ) {
			subdictSubPackageIdx = dictBySubPackageIdx.get( keySubPackageIdx );
		}
		else {
			subdictSubPackageIdx = new TreeMap< GenKbGenItemPKey, GenKbGenFileBuff >();
			dictBySubPackageIdx.put( keySubPackageIdx, subdictSubPackageIdx );
		}
		subdictSubPackageIdx.put( pkey, Buff );

		SortedMap< GenKbGenItemPKey, GenKbGenFileBuff > subdictExpClassIdx;
		if( dictByExpClassIdx.containsKey( keyExpClassIdx ) ) {
			subdictExpClassIdx = dictByExpClassIdx.get( keyExpClassIdx );
		}
		else {
			subdictExpClassIdx = new TreeMap< GenKbGenItemPKey, GenKbGenFileBuff >();
			dictByExpClassIdx.put( keyExpClassIdx, subdictExpClassIdx );
		}
		subdictExpClassIdx.put( pkey, Buff );

		SortedMap< GenKbGenItemPKey, GenKbGenFileBuff > subdictExpKeyNameIdx;
		if( dictByExpKeyNameIdx.containsKey( keyExpKeyNameIdx ) ) {
			subdictExpKeyNameIdx = dictByExpKeyNameIdx.get( keyExpKeyNameIdx );
		}
		else {
			subdictExpKeyNameIdx = new TreeMap< GenKbGenItemPKey, GenKbGenFileBuff >();
			dictByExpKeyNameIdx.put( keyExpKeyNameIdx, subdictExpKeyNameIdx );
		}
		subdictExpKeyNameIdx.put( pkey, Buff );

		SortedMap< GenKbGenItemPKey, GenKbGenFileBuff > subdictExpFileNameIdx;
		if( dictByExpFileNameIdx.containsKey( keyExpFileNameIdx ) ) {
			subdictExpFileNameIdx = dictByExpFileNameIdx.get( keyExpFileNameIdx );
		}
		else {
			subdictExpFileNameIdx = new TreeMap< GenKbGenItemPKey, GenKbGenFileBuff >();
			dictByExpFileNameIdx.put( keyExpFileNameIdx, subdictExpFileNameIdx );
		}
		subdictExpFileNameIdx.put( pkey, Buff );

	}