on ‎2019 Mar 31 10:13 PM
Hi Experts,
We are trying to create a job which looks for eligible products and run following logic on them:
1)A product contains two classifying categories Class A and Class B associated to two different classification system versions. 2) Both these Classifying Categories have respective attributes e.g Attribute A and Attribute B 3)My requirement is to fetch the value of Attribute A and set it to Attribute B.
What can be the approach if I start with building my logic on the eligible product model object?
Regards Rahul
Request clarification before answering.
ClassificationService cs = ...
ProductModel p = ...
// fetch current if necessary
FeatureList features = cs.getFeatures( p );
List<Feature> myFeatures = new ArrayList( features.getFeatures() );
if( features.getFeatureByName( "Foo" ) == null )
{
// add untyped one
myFeatures.add( new Feature( "Foo", Arrays.asList( new FeatureValue( "Bar", null, null ) ), null ) );
}
// store
cs.setFeatures( p, new FeatureList( myFeatures ) );
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.