Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 0.43 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. List<Contentlet> maxGroupID  = null;
  2. Long nextGroupID = null;
  3.  
  4. String groupIDPlus1 = "+structureInode:"+importStructureGroup.getInode()+" +locked:false +live:true";
  5. maxGroupID = conAPI.search(groupIDPlus1, 0, -1, "integer2", PublicUserFactory.getSystemUser(), true);
  6. if(maxGroupID.size()<1)
  7. {
  8.         nextGroupID = 1;
  9. } else {
  10.         for(Contentlet con : maxGroupID)
  11.         {
  12.                 nextGroupID = con.getLongProperty("groupid");
  13.         }
  14.         nextGroupID++;
  15. }