package com.l7tech.identity;

import com.l7tech.objectmodel.AnonymousEntityReference;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.migration.Migration;
import com.l7tech.objectmodel.migration.MigrationMappingSelection;
import com.l7tech.objectmodel.migration.PropertyResolver.Type;

public class AnonymousGroupReference extends AnonymousEntityReference implements Group {
   private final GroupBean groupBean;
   static final long serialVersionUID = 3808104696462500240L;

   public AnonymousGroupReference(String var1, Goid var2, String var3) {
      this(var1, var2, var3, null);
   }

   public AnonymousGroupReference(String var1, Goid var2, String var3, String var4) {
      super(Group.class, var1, var3);
      this.groupBean = new GroupBean(var2, null);
      this.groupBean.setUniqueIdentifier(var1);
      this.groupBean.setDescription(var4);
   }

   @Migration(mapName = MigrationMappingSelection.NONE, mapValue = MigrationMappingSelection.NONE, export = false, resolver = Type.ID_PROVIDER_CONFIG)
   @Override
   public Goid getProviderId() {
      return this.groupBean.getProviderId();
   }

   @Override
   public boolean isEquivalentId(Object var1) {
      return var1 != null && var1.equals(this.uniqueId);
   }

   public String getId() {
      return this.groupBean.getId();
   }

   @Override
   public String getDescription() {
      return this.groupBean.getDescription();
   }

   public GroupBean getGroupBean() {
      return this.groupBean;
   }
}
