IdentityEntity.java

  1. /*
  2.  * Copyright (C) 2003-2015 eXo Platform SAS.
  3.  *
  4.  * This program is free software; you can redistribute it and/or
  5.  * modify it under the terms of the GNU Affero General Public License
  6.  * as published by the Free Software Foundation; either version 3
  7.  * of the License, or (at your option) any later version.
  8.  *
  9.  * This program is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12.  * GNU General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU General Public License
  15.  * along with this program; if not, see<http://www.gnu.org/licenses/>.
  16. */

  17. package org.exoplatform.social.rest.entity;

  18. import org.exoplatform.social.core.identity.model.GlobalId;

  19. public class IdentityEntity extends BaseEntity {
  20.   private static final long serialVersionUID = -1900502217691572027L;

  21.   public IdentityEntity() {
  22.   }

  23.   public IdentityEntity(String id) {
  24.     super(id);
  25.   }

  26.   public IdentityEntity setRemoteId(String remoteId) {
  27.     setProperty("remoteId", remoteId);
  28.     return this;
  29.   }

  30.   public String getRemoteId() {
  31.     return getString("remoteId");
  32.   }

  33.   public IdentityEntity setProviderId(String providerId) {
  34.     setProperty("providerId", providerId);
  35.     return this;
  36.   }

  37.   public String getProviderId() {
  38.     return getString("providerId");
  39.   }

  40.   public IdentityEntity setGlobalId(GlobalId globalId) {
  41.     setProperty("globalId", globalId);
  42.     return this;
  43.   }

  44.   public IdentityEntity setDeleted(Boolean deleted) {
  45.     setProperty("deleted", deleted);
  46.     return this;
  47.   }

  48.   public String getDeleted() {
  49.     return getString("deleted");
  50.   }

  51.   public IdentityEntity setProfile(ProfileEntity profile) {
  52.     setProperty("profile", profile);
  53.     return this;
  54.   }

  55.   public ProfileEntity getProfile() {
  56.     return (ProfileEntity) getProperty("profile");
  57.   }
  58. }