자산 카테고리화

자산에 카테고리를 추가하려면 RAMAsset.categorize(SubCategory) 또는 RAMAsset.categorize(Category,String)을 사용하십시오.

                //Categorize using the category schema fetched from the session
                CategorySchema automobilesSchema = 
                        session.getCategorySchema("Automobiles");
                
                Category priceCategory = automobilesSchema.getCategory("Price");
                newAsset.categorize(priceCategory, "25000");
                
                //Categorize using a category fetched through the asset
                automobilesSchema = newAsset.getAvailableCategorySchema("Automobiles");
                
                Category colorCategory = automobilesSchema.getCategory("Color");
                newAsset.categorize(colorCategory, "Red");
                
                //Categorize using sub category objects
                Category modelCategory = automobilesSchema.getCategory("Model");
                SubCategory domestic = modelCategory.getSubCategory("Domestic");
                SubCategory foreign = modelCategory.getSubCategory("Foreign");
                SubCategory honda = foreign.getSubCategory("Honda");
                SubCategory camry = foreign.getSubCategory("Toyota/Camry");
                newAsset.categorize(domestic);
                newAsset.categorize(honda);
                newAsset.categorize(camry);
                
                session.put(newAsset, new NullProgressMonitor());

피드백