You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ma...@apache.org on 2014/12/12 02:29:45 UTC

[02/51] [partial] incubator-ranger git commit: RANGER-194: Rename packages from xasecure to apache ranger

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/413fcb68/security-admin/src/main/java/org/apache/ranger/entity/XXAsset.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXAsset.java b/security-admin/src/main/java/org/apache/ranger/entity/XXAsset.java
new file mode 100644
index 0000000..f203cf6
--- /dev/null
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXAsset.java
@@ -0,0 +1,289 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ package org.apache.ranger.entity;
+
+/**
+ * Asset
+ * 
+ */
+
+import java.util.*;
+
+import javax.persistence.*;
+import javax.xml.bind.annotation.*;
+
+import org.apache.ranger.common.*;
+import org.apache.ranger.entity.*;
+
+
+@Entity
+@Table(name="x_asset")
+@XmlRootElement
+public class XXAsset extends XXDBBase implements java.io.Serializable {
+	private static final long serialVersionUID = 1L;
+
+	@Id
+	@SequenceGenerator(name="X_ASSET_SEQ",sequenceName="X_ASSET_SEQ",allocationSize=1)
+	@GeneratedValue(strategy=GenerationType.AUTO,generator="X_ASSET_SEQ")
+	@Column(name="ID")
+	protected Long id;
+
+	@Override
+	public void setId(Long id) {
+		this.id=id;
+	}
+	@Override
+	public Long getId() {
+		return id;
+	}
+	/**
+	 * Name
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>1024</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="ASSET_NAME"  , nullable=false , length=1024)
+	protected String name;
+
+	/**
+	 * Description
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>4000</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="DESCR"  , nullable=false , length=4000)
+	protected String description;
+
+	/**
+	 * Status
+	 * <ul>
+	 * <li>This attribute is of type enum CommonEnums::ActiveStatus
+	 * </ul>
+	 *
+	 */
+	@Column(name="ACT_STATUS"  , nullable=false )
+	protected int activeStatus = XAConstants.STATUS_DISABLED;
+
+	/**
+	 * Type of asset
+	 * <ul>
+	 * <li>This attribute is of type enum CommonEnums::AssetType
+	 * </ul>
+	 *
+	 */
+	@Column(name="ASSET_TYPE"  , nullable=false )
+	protected int assetType = AppConstants.ASSET_UNKNOWN;
+
+	/**
+	 * Config in json format
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>10000</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="CONFIG"   , length=10000)
+	protected String config;
+
+	/**
+	 * Support native authorization
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="SUP_NATIVE"  , nullable=false )
+	protected boolean supportNative = false;
+
+	/**
+	 * Default constructor. This will set all the attributes to default value.
+	 */
+	public XXAsset ( ) {
+		activeStatus = XAConstants.STATUS_DISABLED;
+		assetType = AppConstants.ASSET_UNKNOWN;
+	}
+
+	@Override
+	public int getMyClassType( ) {
+	    return AppConstants.CLASS_TYPE_XA_ASSET;
+	}
+
+	@Override
+	public String getMyDisplayValue() {
+		return getDescription( );
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>name</b>.
+	 * You cannot set null to the attribute.
+	 * @param name Value to set member attribute <b>name</b>
+	 */
+	public void setName( String name ) {
+		this.name = name;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>name</b>
+	 * @return String - value of member attribute <b>name</b>.
+	 */
+	public String getName( ) {
+		return this.name;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>description</b>.
+	 * You cannot set null to the attribute.
+	 * @param description Value to set member attribute <b>description</b>
+	 */
+	public void setDescription( String description ) {
+		this.description = description;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>description</b>
+	 * @return String - value of member attribute <b>description</b>.
+	 */
+	public String getDescription( ) {
+		return this.description;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>activeStatus</b>.
+	 * You cannot set null to the attribute.
+	 * @param activeStatus Value to set member attribute <b>activeStatus</b>
+	 */
+	public void setActiveStatus( int activeStatus ) {
+		this.activeStatus = activeStatus;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>activeStatus</b>
+	 * @return int - value of member attribute <b>activeStatus</b>.
+	 */
+	public int getActiveStatus( ) {
+		return this.activeStatus;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>assetType</b>.
+	 * You cannot set null to the attribute.
+	 * @param assetType Value to set member attribute <b>assetType</b>
+	 */
+	public void setAssetType( int assetType ) {
+		this.assetType = assetType;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>assetType</b>
+	 * @return int - value of member attribute <b>assetType</b>.
+	 */
+	public int getAssetType( ) {
+		return this.assetType;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>config</b>.
+	 * You cannot set null to the attribute.
+	 * @param config Value to set member attribute <b>config</b>
+	 */
+	public void setConfig( String config ) {
+		this.config = config;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>config</b>
+	 * @return String - value of member attribute <b>config</b>.
+	 */
+	public String getConfig( ) {
+		return this.config;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>supportNative</b>.
+	 * You cannot set null to the attribute.
+	 * @param supportNative Value to set member attribute <b>supportNative</b>
+	 */
+	public void setSupportNative( boolean supportNative ) {
+		this.supportNative = supportNative;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>supportNative</b>
+	 * @return boolean - value of member attribute <b>supportNative</b>.
+	 */
+	public boolean isSupportNative( ) {
+		return this.supportNative;
+	}
+
+	/**
+	 * This return the bean content in string format
+	 * @return formatedStr
+	*/
+	@Override
+	public String toString( ) {
+		String str = "XXAsset={";
+		str += super.toString();
+		str += "name={" + name + "} ";
+		str += "description={" + description + "} ";
+		str += "activeStatus={" + activeStatus + "} ";
+		str += "assetType={" + assetType + "} ";
+		str += "config={" + config + "} ";
+		str += "supportNative={" + supportNative + "} ";
+		str += "}";
+		return str;
+	}
+
+	/**
+	 * Checks for all attributes except referenced db objects
+	 * @return true if all attributes match
+	*/
+	@Override
+	public boolean equals( Object obj) {
+		if ( !super.equals(obj) ) {
+			return false;
+		}
+		XXAsset other = (XXAsset) obj;
+        	if ((this.name == null && other.name != null) || (this.name != null && !this.name.equals(other.name))) {
+            		return false;
+        	}
+        	if ((this.description == null && other.description != null) || (this.description != null && !this.description.equals(other.description))) {
+            		return false;
+        	}
+		if( this.activeStatus != other.activeStatus ) return false;
+		if( this.assetType != other.assetType ) return false;
+        	if ((this.config == null && other.config != null) || (this.config != null && !this.config.equals(other.config))) {
+            		return false;
+        	}
+		if( this.supportNative != other.supportNative ) return false;
+		return true;
+	}
+	public static String getEnumName(String fieldName ) {
+		if( fieldName.equals("activeStatus") ) {
+			return "CommonEnums.ActiveStatus";
+		}
+		if( fieldName.equals("assetType") ) {
+			return "CommonEnums.AssetType";
+		}
+		//Later TODO
+		//return super.getEnumName(fieldName);
+		return null;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/413fcb68/security-admin/src/main/java/org/apache/ranger/entity/XXAuditMap.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXAuditMap.java b/security-admin/src/main/java/org/apache/ranger/entity/XXAuditMap.java
new file mode 100644
index 0000000..dd14898
--- /dev/null
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXAuditMap.java
@@ -0,0 +1,228 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ package org.apache.ranger.entity;
+
+/**
+ * Audi map
+ * 
+ */
+
+import java.util.*;
+
+import javax.persistence.*;
+import javax.xml.bind.annotation.*;
+
+import org.apache.ranger.common.*;
+import org.apache.ranger.entity.*;
+
+
+@Entity
+@Table(name="x_audit_map")
+@XmlRootElement
+public class XXAuditMap extends XXDBBase implements java.io.Serializable {
+	private static final long serialVersionUID = 1L;
+
+
+	@Id
+	@SequenceGenerator(name="X_AUDIT_MAP_SEQ",sequenceName="X_AUDIT_MAP_SEQ",allocationSize=1)
+	@GeneratedValue(strategy=GenerationType.AUTO,generator="X_AUDIT_MAP_SEQ")
+	@Column(name="ID")
+	protected Long id;
+	@Override
+	public void setId(Long id) {
+		this.id=id;
+	}
+
+	@Override
+	public Long getId() {
+		return id;
+	}
+
+	/**
+	 * Id of the resource
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="RES_ID"   )
+	protected Long resourceId;
+
+
+	/**
+	 * Id of the group
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="GROUP_ID"   )
+	protected Long groupId;
+
+
+	/**
+	 * Id of the user
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="USER_ID"   )
+	protected Long userId;
+
+
+	/**
+	 * Type of audit
+	 * <ul>
+	 * <li>This attribute is of type enum CommonEnums::XAAuditType
+	 * </ul>
+	 *
+	 */
+	@Column(name="AUDIT_TYPE"  , nullable=false )
+	protected int auditType = AppConstants.XA_AUDIT_TYPE_UNKNOWN;
+
+	/**
+	 * Default constructor. This will set all the attributes to default value.
+	 */
+	public XXAuditMap ( ) {
+		auditType = AppConstants.XA_AUDIT_TYPE_UNKNOWN;
+	}
+
+	@Override
+	public int getMyClassType( ) {
+	    return AppConstants.CLASS_TYPE_XA_AUDIT_MAP;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>resourceId</b>.
+	 * You cannot set null to the attribute.
+	 * @param resourceId Value to set member attribute <b>resourceId</b>
+	 */
+	public void setResourceId( Long resourceId ) {
+		this.resourceId = resourceId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>resourceId</b>
+	 * @return Long - value of member attribute <b>resourceId</b>.
+	 */
+	public Long getResourceId( ) {
+		return this.resourceId;
+	}
+
+
+	/**
+	 * This method sets the value to the member attribute <b>groupId</b>.
+	 * You cannot set null to the attribute.
+	 * @param groupId Value to set member attribute <b>groupId</b>
+	 */
+	public void setGroupId( Long groupId ) {
+		this.groupId = groupId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>groupId</b>
+	 * @return Long - value of member attribute <b>groupId</b>.
+	 */
+	public Long getGroupId( ) {
+		return this.groupId;
+	}
+
+
+	/**
+	 * This method sets the value to the member attribute <b>userId</b>.
+	 * You cannot set null to the attribute.
+	 * @param userId Value to set member attribute <b>userId</b>
+	 */
+	public void setUserId( Long userId ) {
+		this.userId = userId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>userId</b>
+	 * @return Long - value of member attribute <b>userId</b>.
+	 */
+	public Long getUserId( ) {
+		return this.userId;
+	}
+
+
+	/**
+	 * This method sets the value to the member attribute <b>auditType</b>.
+	 * You cannot set null to the attribute.
+	 * @param auditType Value to set member attribute <b>auditType</b>
+	 */
+	public void setAuditType( int auditType ) {
+		this.auditType = auditType;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>auditType</b>
+	 * @return int - value of member attribute <b>auditType</b>.
+	 */
+	public int getAuditType( ) {
+		return this.auditType;
+	}
+
+	/**
+	 * This return the bean content in string format
+	 * @return formatedStr
+	*/
+	@Override
+	public String toString( ) {
+		String str = "XXAuditMap={";
+		str += super.toString();
+		str += "resourceId={" + resourceId + "} ";
+		str += "groupId={" + groupId + "} ";
+		str += "userId={" + userId + "} ";
+		str += "auditType={" + auditType + "} ";
+		str += "}";
+		return str;
+	}
+
+	/**
+	 * Checks for all attributes except referenced db objects
+	 * @return true if all attributes match
+	*/
+	@Override
+	public boolean equals( Object obj) {
+		if ( !super.equals(obj) ) {
+			return false;
+		}
+		XXAuditMap other = (XXAuditMap) obj;
+        	if ((this.resourceId == null && other.resourceId != null) || (this.resourceId != null && !this.resourceId.equals(other.resourceId))) {
+            		return false;
+        	}
+        	if ((this.groupId == null && other.groupId != null) || (this.groupId != null && !this.groupId.equals(other.groupId))) {
+            		return false;
+        	}
+        	if ((this.userId == null && other.userId != null) || (this.userId != null && !this.userId.equals(other.userId))) {
+            		return false;
+        	}
+		if( this.auditType != other.auditType ) return false;
+		return true;
+	}
+	public static String getEnumName(String fieldName ) {
+		if( fieldName.equals("auditType") ) {
+			return "CommonEnums.XAAuditType";
+		}
+		//Later TODO
+		//return super.getEnumName(fieldName);
+		return null;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/413fcb68/security-admin/src/main/java/org/apache/ranger/entity/XXAuthSession.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXAuthSession.java b/security-admin/src/main/java/org/apache/ranger/entity/XXAuthSession.java
new file mode 100644
index 0000000..d54ce72
--- /dev/null
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXAuthSession.java
@@ -0,0 +1,472 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ package org.apache.ranger.entity;
+
+/**
+ * Authentication session
+ * 
+ */
+
+import java.util.*;
+
+import javax.persistence.*;
+import javax.xml.bind.annotation.*;
+
+import org.apache.ranger.common.*;
+import org.apache.ranger.entity.*;
+
+
+@Entity
+@Table(name="x_auth_sess")
+@XmlRootElement
+public class XXAuthSession extends XXDBBase implements java.io.Serializable {
+	private static final long serialVersionUID = 1L;
+
+	@Id
+	@SequenceGenerator(name="X_AUTH_SESS_SEQ",sequenceName="X_AUTH_SESS_SEQ",allocationSize=1)
+	@GeneratedValue(strategy=GenerationType.AUTO,generator="X_AUTH_SESS_SEQ")
+	@Column(name="ID")
+	protected Long id;
+	@Override
+	public void setId(Long id) {
+		this.id=id;
+	}
+
+	@Override
+	public Long getId() {
+		return id;
+	}
+	/**
+	 * Enum values for AuthStatus
+	 */
+	/**
+	 * AUTH_STATUS_UNKNOWN is an element of enum AuthStatus. Its value is "AUTH_STATUS_UNKNOWN".
+	 */
+	public static final int AUTH_STATUS_UNKNOWN = 0;
+	/**
+	 * AUTH_STATUS_SUCCESS is an element of enum AuthStatus. Its value is "AUTH_STATUS_SUCCESS".
+	 */
+	public static final int AUTH_STATUS_SUCCESS = 1;
+	/**
+	 * AUTH_STATUS_WRONG_PASSWORD is an element of enum AuthStatus. Its value is "AUTH_STATUS_WRONG_PASSWORD".
+	 */
+	public static final int AUTH_STATUS_WRONG_PASSWORD = 2;
+	/**
+	 * AUTH_STATUS_DISABLED is an element of enum AuthStatus. Its value is "AUTH_STATUS_DISABLED".
+	 */
+	public static final int AUTH_STATUS_DISABLED = 3;
+	/**
+	 * AUTH_STATUS_LOCKED is an element of enum AuthStatus. Its value is "AUTH_STATUS_LOCKED".
+	 */
+	public static final int AUTH_STATUS_LOCKED = 4;
+	/**
+	 * AUTH_STATUS_PASSWORD_EXPIRED is an element of enum AuthStatus. Its value is "AUTH_STATUS_PASSWORD_EXPIRED".
+	 */
+	public static final int AUTH_STATUS_PASSWORD_EXPIRED = 5;
+	/**
+	 * AUTH_STATUS_USER_NOT_FOUND is an element of enum AuthStatus. Its value is "AUTH_STATUS_USER_NOT_FOUND".
+	 */
+	public static final int AUTH_STATUS_USER_NOT_FOUND = 6;
+
+	/**
+	 * Max value for enum AuthStatus_MAX
+	 */
+	public static final int AuthStatus_MAX = 6;
+
+	/**
+	 * Enum values for AuthType
+	 */
+	/**
+	 * AUTH_TYPE_UNKNOWN is an element of enum AuthType. Its value is "AUTH_TYPE_UNKNOWN".
+	 */
+	public static final int AUTH_TYPE_UNKNOWN = 0;
+	/**
+	 * AUTH_TYPE_PASSWORD is an element of enum AuthType. Its value is "AUTH_TYPE_PASSWORD".
+	 */
+	public static final int AUTH_TYPE_PASSWORD = 1;
+
+	/**
+	 * Max value for enum AuthType_MAX
+	 */
+	public static final int AuthType_MAX = 1;
+
+
+
+	/**
+	 * Login ID of the user
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>767</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="LOGIN_ID"  , nullable=false , length=767)
+	protected String loginId;
+
+	/**
+	 * Id of the user
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="USER_ID"   )
+	protected Long userId;
+
+
+	/**
+	 * External session id. Currently spring/http session
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>512</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="EXT_SESS_ID"   , length=512)
+	protected String extSessionId;
+
+	/**
+	 * Date and time of authentication
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Temporal(TemporalType.TIMESTAMP)
+	@Column(name="AUTH_TIME"  , nullable=false )
+	protected Date authTime = DateUtil.getUTCDate();
+
+	/**
+	 * Authentication status
+	 * <ul>
+	 * <li>This attribute is of type enum XXAuthSession::AuthStatus
+	 * </ul>
+	 *
+	 */
+	@Column(name="AUTH_STATUS"  , nullable=false )
+	protected int authStatus = AUTH_STATUS_UNKNOWN;
+
+	/**
+	 * Authentication type
+	 * <ul>
+	 * <li>This attribute is of type enum XXAuthSession::AuthType
+	 * </ul>
+	 *
+	 */
+	@Column(name="AUTH_TYPE"  , nullable=false )
+	protected int authType = AUTH_TYPE_UNKNOWN;
+
+	/**
+	 * Authentication provider
+	 * <ul>
+	 * <li>This attribute is of type enum XXAuthSession::AuthType
+	 * </ul>
+	 *
+	 */
+	@Column(name="AUTH_PROVIDER"  , nullable=false )
+	protected int authProvider = AUTH_TYPE_UNKNOWN;
+
+	/**
+	 * Type of the device
+	 * <ul>
+	 * <li>This attribute is of type enum CommonEnums::DeviceType
+	 * </ul>
+	 *
+	 */
+	@Column(name="DEVICE_TYPE"  , nullable=false )
+	protected int deviceType = XAConstants.DEVICE_UNKNOWN;
+
+	/**
+	 * IP where the request came from
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>48</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="REQ_IP"  , nullable=false , length=48)
+	protected String requestIP;
+
+	/**
+	 * UserAgent of the requesting device
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>1024</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="REQ_UA"   , length=1024)
+	protected String requestUserAgent;
+
+	/**
+	 * Default constructor. This will set all the attributes to default value.
+	 */
+	public XXAuthSession ( ) {
+		authStatus = AUTH_STATUS_UNKNOWN;
+		authType = AUTH_TYPE_UNKNOWN;
+		authProvider = AUTH_TYPE_UNKNOWN;
+		deviceType = XAConstants.DEVICE_UNKNOWN;
+	}
+
+	@Override
+	public int getMyClassType( ) {
+	    return AppConstants.CLASS_TYPE_AUTH_SESS;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>loginId</b>.
+	 * You cannot set null to the attribute.
+	 * @param loginId Value to set member attribute <b>loginId</b>
+	 */
+	public void setLoginId( String loginId ) {
+		this.loginId = loginId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>loginId</b>
+	 * @return String - value of member attribute <b>loginId</b>.
+	 */
+	public String getLoginId( ) {
+		return this.loginId;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>userId</b>.
+	 * You cannot set null to the attribute.
+	 * @param userId Value to set member attribute <b>userId</b>
+	 */
+	public void setUserId( Long userId ) {
+		this.userId = userId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>userId</b>
+	 * @return Long - value of member attribute <b>userId</b>.
+	 */
+	public Long getUserId( ) {
+		return this.userId;
+	}
+
+
+	/**
+	 * This method sets the value to the member attribute <b>extSessionId</b>.
+	 * You cannot set null to the attribute.
+	 * @param extSessionId Value to set member attribute <b>extSessionId</b>
+	 */
+	public void setExtSessionId( String extSessionId ) {
+		this.extSessionId = extSessionId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>extSessionId</b>
+	 * @return String - value of member attribute <b>extSessionId</b>.
+	 */
+	public String getExtSessionId( ) {
+		return this.extSessionId;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>authTime</b>.
+	 * You cannot set null to the attribute.
+	 * @param authTime Value to set member attribute <b>authTime</b>
+	 */
+	public void setAuthTime( Date authTime ) {
+		this.authTime = authTime;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>authTime</b>
+	 * @return Date - value of member attribute <b>authTime</b>.
+	 */
+	public Date getAuthTime( ) {
+		return this.authTime;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>authStatus</b>.
+	 * You cannot set null to the attribute.
+	 * @param authStatus Value to set member attribute <b>authStatus</b>
+	 */
+	public void setAuthStatus( int authStatus ) {
+		this.authStatus = authStatus;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>authStatus</b>
+	 * @return int - value of member attribute <b>authStatus</b>.
+	 */
+	public int getAuthStatus( ) {
+		return this.authStatus;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>authType</b>.
+	 * You cannot set null to the attribute.
+	 * @param authType Value to set member attribute <b>authType</b>
+	 */
+	public void setAuthType( int authType ) {
+		this.authType = authType;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>authType</b>
+	 * @return int - value of member attribute <b>authType</b>.
+	 */
+	public int getAuthType( ) {
+		return this.authType;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>authProvider</b>.
+	 * You cannot set null to the attribute.
+	 * @param authProvider Value to set member attribute <b>authProvider</b>
+	 */
+	public void setAuthProvider( int authProvider ) {
+		this.authProvider = authProvider;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>authProvider</b>
+	 * @return int - value of member attribute <b>authProvider</b>.
+	 */
+	public int getAuthProvider( ) {
+		return this.authProvider;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>deviceType</b>.
+	 * You cannot set null to the attribute.
+	 * @param deviceType Value to set member attribute <b>deviceType</b>
+	 */
+	public void setDeviceType( int deviceType ) {
+		this.deviceType = deviceType;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>deviceType</b>
+	 * @return int - value of member attribute <b>deviceType</b>.
+	 */
+	public int getDeviceType( ) {
+		return this.deviceType;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>requestIP</b>.
+	 * You cannot set null to the attribute.
+	 * @param requestIP Value to set member attribute <b>requestIP</b>
+	 */
+	public void setRequestIP( String requestIP ) {
+		this.requestIP = requestIP;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>requestIP</b>
+	 * @return String - value of member attribute <b>requestIP</b>.
+	 */
+	public String getRequestIP( ) {
+		return this.requestIP;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>requestUserAgent</b>.
+	 * You cannot set null to the attribute.
+	 * @param requestUserAgent Value to set member attribute <b>requestUserAgent</b>
+	 */
+	public void setRequestUserAgent( String requestUserAgent ) {
+		this.requestUserAgent = requestUserAgent;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>requestUserAgent</b>
+	 * @return String - value of member attribute <b>requestUserAgent</b>.
+	 */
+	public String getRequestUserAgent( ) {
+		return this.requestUserAgent;
+	}
+
+	/**
+	 * This return the bean content in string format
+	 * @return formatedStr
+	*/
+	@Override
+	public String toString( ) {
+		String str = "XXAuthSession={";
+		str += super.toString();
+		str += "loginId={" + loginId + "} ";
+		str += "userId={" + userId + "} ";
+		str += "extSessionId={" + extSessionId + "} ";
+		str += "authTime={" + authTime + "} ";
+		str += "authStatus={" + authStatus + "} ";
+		str += "authType={" + authType + "} ";
+		str += "authProvider={" + authProvider + "} ";
+		str += "deviceType={" + deviceType + "} ";
+		str += "requestIP={" + requestIP + "} ";
+		str += "requestUserAgent={" + requestUserAgent + "} ";
+		str += "}";
+		return str;
+	}
+
+	/**
+	 * Checks for all attributes except referenced db objects
+	 * @return true if all attributes match
+	*/
+	@Override
+	public boolean equals( Object obj) {
+		if ( !super.equals(obj) ) {
+			return false;
+		}
+		XXAuthSession other = (XXAuthSession) obj;
+        	if ((this.loginId == null && other.loginId != null) || (this.loginId != null && !this.loginId.equals(other.loginId))) {
+            		return false;
+        	}
+        	if ((this.userId == null && other.userId != null) || (this.userId != null && !this.userId.equals(other.userId))) {
+            		return false;
+        	}
+        	if ((this.extSessionId == null && other.extSessionId != null) || (this.extSessionId != null && !this.extSessionId.equals(other.extSessionId))) {
+            		return false;
+        	}
+        	if ((this.authTime == null && other.authTime != null) || (this.authTime != null && !this.authTime.equals(other.authTime))) {
+            		return false;
+        	}
+		if( this.authStatus != other.authStatus ) return false;
+		if( this.authType != other.authType ) return false;
+		if( this.authProvider != other.authProvider ) return false;
+		if( this.deviceType != other.deviceType ) return false;
+        	if ((this.requestIP == null && other.requestIP != null) || (this.requestIP != null && !this.requestIP.equals(other.requestIP))) {
+            		return false;
+        	}
+        	if ((this.requestUserAgent == null && other.requestUserAgent != null) || (this.requestUserAgent != null && !this.requestUserAgent.equals(other.requestUserAgent))) {
+            		return false;
+        	}
+		return true;
+	}
+	public static String getEnumName(String fieldName ) {
+		if( fieldName.equals("authStatus") ) {
+			return "CommonEnums.AuthStatus";
+		}
+		if( fieldName.equals("authType") ) {
+			return "CommonEnums.AuthType";
+		}
+		if( fieldName.equals("authProvider") ) {
+			return "CommonEnums.AuthType";
+		}
+		if( fieldName.equals("deviceType") ) {
+			return "CommonEnums.DeviceType";
+		}
+		//Later TODO
+		//return super.getEnumName(fieldName);
+		return null;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/413fcb68/security-admin/src/main/java/org/apache/ranger/entity/XXCredentialStore.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXCredentialStore.java b/security-admin/src/main/java/org/apache/ranger/entity/XXCredentialStore.java
new file mode 100644
index 0000000..b300071
--- /dev/null
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXCredentialStore.java
@@ -0,0 +1,164 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ package org.apache.ranger.entity;
+
+/**
+ * Credential Store
+ * 
+ */
+
+import java.util.*;
+
+import javax.persistence.*;
+import javax.xml.bind.annotation.*;
+
+import org.apache.ranger.common.*;
+import org.apache.ranger.entity.*;
+
+
+@Entity
+@Table(name="x_cred_store")
+@XmlRootElement
+public class XXCredentialStore extends XXDBBase implements java.io.Serializable {
+	private static final long serialVersionUID = 1L;
+
+	@Id
+	@SequenceGenerator(name="X_CRED_STORE_SEQ",sequenceName="X_CRED_STORE_SEQ",allocationSize=1)
+	@GeneratedValue(strategy=GenerationType.AUTO,generator="X_CRED_STORE_SEQ")
+	@Column(name="ID")
+	protected Long id;
+
+	@Override
+	public void setId(Long id) {
+		this.id=id;
+	}
+	@Override
+	public Long getId() {
+		return id;
+	}
+	/**
+	 * Name
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>1024</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="STORE_NAME"  , nullable=false , length=1024)
+	protected String name;
+
+	/**
+	 * Description
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>4000</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="DESCR"  , nullable=false , length=4000)
+	protected String description;
+
+	/**
+	 * Default constructor. This will set all the attributes to default value.
+	 */
+	public XXCredentialStore ( ) {
+	}
+
+	@Override
+	public int getMyClassType( ) {
+	    return AppConstants.CLASS_TYPE_XA_CRED_STORE;
+	}
+
+	@Override
+	public String getMyDisplayValue() {
+		return getDescription( );
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>name</b>.
+	 * You cannot set null to the attribute.
+	 * @param name Value to set member attribute <b>name</b>
+	 */
+	public void setName( String name ) {
+		this.name = name;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>name</b>
+	 * @return String - value of member attribute <b>name</b>.
+	 */
+	public String getName( ) {
+		return this.name;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>description</b>.
+	 * You cannot set null to the attribute.
+	 * @param description Value to set member attribute <b>description</b>
+	 */
+	public void setDescription( String description ) {
+		this.description = description;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>description</b>
+	 * @return String - value of member attribute <b>description</b>.
+	 */
+	public String getDescription( ) {
+		return this.description;
+	}
+
+	/**
+	 * This return the bean content in string format
+	 * @return formatedStr
+	*/
+	@Override
+	public String toString( ) {
+		String str = "XXCredentialStore={";
+		str += super.toString();
+		str += "name={" + name + "} ";
+		str += "description={" + description + "} ";
+		str += "}";
+		return str;
+	}
+
+	/**
+	 * Checks for all attributes except referenced db objects
+	 * @return true if all attributes match
+	*/
+	@Override
+	public boolean equals( Object obj) {
+		if ( !super.equals(obj) ) {
+			return false;
+		}
+		XXCredentialStore other = (XXCredentialStore) obj;
+        	if ((this.name == null && other.name != null) || (this.name != null && !this.name.equals(other.name))) {
+            		return false;
+        	}
+        	if ((this.description == null && other.description != null) || (this.description != null && !this.description.equals(other.description))) {
+            		return false;
+        	}
+		return true;
+	}
+	public static String getEnumName(String fieldName ) {
+		//Later TODO
+		//return super.getEnumName(fieldName);
+		return null;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/413fcb68/security-admin/src/main/java/org/apache/ranger/entity/XXDBBase.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXDBBase.java b/security-admin/src/main/java/org/apache/ranger/entity/XXDBBase.java
new file mode 100644
index 0000000..666f0f5
--- /dev/null
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXDBBase.java
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ package org.apache.ranger.entity;
+
+/**
+ * Base JPA class with id, versionNumber and other common attributes
+ * 
+ */
+
+import java.util.*;
+
+import javax.persistence.*;
+import javax.xml.bind.annotation.*;
+
+import org.apache.ranger.common.*;
+import org.apache.ranger.entity.*;
+
+
+@MappedSuperclass @EntityListeners( org.apache.ranger.common.db.JPABeanCallbacks.class)
+@XmlRootElement
+public abstract class XXDBBase extends Object implements java.io.Serializable {
+	private static final long serialVersionUID = 1L;
+
+
+
+	/**
+	 * Id for the object
+	 * <ul>
+	 * <li>This attribute is the <b>Primary Key</b> for this class<br>.
+	 * </ul>
+	 *
+	 */
+
+	/**
+	 * Date/Time creation of this user.
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Temporal(TemporalType.TIMESTAMP)
+	@Column(name="CREATE_TIME"   )
+	protected Date createTime = DateUtil.getUTCDate();
+
+	/**
+	 * Date value.
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Temporal(TemporalType.TIMESTAMP)
+	@Column(name="UPDATE_TIME"   )
+	protected Date updateTime = DateUtil.getUTCDate();
+
+	/**
+	 * Added by
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="ADDED_BY_ID"   )
+	protected Long addedByUserId;
+
+
+	/**
+	 * Last updated by
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="UPD_BY_ID"   )
+	protected Long updatedByUserId;
+
+
+	/**
+	 * Default constructor. This will set all the attributes to default value.
+	 */
+	public XXDBBase ( ) {
+	}
+
+	public int getMyClassType( ) {
+	    return AppConstants.CLASS_TYPE_NONE;
+	}
+
+	public String getMyDisplayValue() {
+		return null;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>id</b>.
+	 * You cannot set null to the attribute.
+	 * @param id Value to set member attribute <b>id</b>
+	 */
+	public abstract void setId( Long id ) ;
+
+	/**
+	 * Returns the value for the member attribute <b>id</b>
+	 * @return Long - value of member attribute <b>id</b>.
+	 */
+	public abstract Long getId( );
+
+	/**
+	 * This method sets the value to the member attribute <b>createTime</b>.
+	 * You cannot set null to the attribute.
+	 * @param createTime Value to set member attribute <b>createTime</b>
+	 */
+	public void setCreateTime( Date createTime ) {
+		this.createTime = createTime;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>createTime</b>
+	 * @return Date - value of member attribute <b>createTime</b>.
+	 */
+	public Date getCreateTime( ) {
+		return this.createTime;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>updateTime</b>.
+	 * You cannot set null to the attribute.
+	 * @param updateTime Value to set member attribute <b>updateTime</b>
+	 */
+	public void setUpdateTime( Date updateTime ) {
+		this.updateTime = updateTime;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>updateTime</b>
+	 * @return Date - value of member attribute <b>updateTime</b>.
+	 */
+	public Date getUpdateTime( ) {
+		return this.updateTime;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>addedByUserId</b>.
+	 * You cannot set null to the attribute.
+	 * @param addedByUserId Value to set member attribute <b>addedByUserId</b>
+	 */
+	public void setAddedByUserId( Long addedByUserId ) {
+		this.addedByUserId = addedByUserId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>addedByUserId</b>
+	 * @return Long - value of member attribute <b>addedByUserId</b>.
+	 */
+	public Long getAddedByUserId( ) {
+		return this.addedByUserId;
+	}
+
+
+	/**
+	 * This method sets the value to the member attribute <b>updatedByUserId</b>.
+	 * You cannot set null to the attribute.
+	 * @param updatedByUserId Value to set member attribute <b>updatedByUserId</b>
+	 */
+	public void setUpdatedByUserId( Long updatedByUserId ) {
+		this.updatedByUserId = updatedByUserId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>updatedByUserId</b>
+	 * @return Long - value of member attribute <b>updatedByUserId</b>.
+	 */
+	public Long getUpdatedByUserId( ) {
+		return this.updatedByUserId;
+	}
+
+
+	/**
+	 * This return the bean content in string format
+	 * @return formatedStr
+	*/
+	@Override
+	public String toString( ) {
+		String str = "XXDBBase={";
+		//`str += "id={" + id + "} ";
+		str += "createTime={" + createTime + "} ";
+		str += "updateTime={" + updateTime + "} ";
+		str += "addedByUserId={" + addedByUserId + "} ";
+		str += "updatedByUserId={" + updatedByUserId + "} ";
+		str += "}";
+		return str;
+	}
+
+	/**
+	 * Checks for all attributes except referenced db objects
+	 * @return true if all attributes match
+	*/
+	@Override
+	public boolean equals( Object obj) {
+		XXDBBase other = (XXDBBase) obj;
+//        	if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
+//            		return false;
+//        	}
+        	if ((this.createTime == null && other.createTime != null) || (this.createTime != null && !this.createTime.equals(other.createTime))) {
+            		return false;
+        	}
+        	if ((this.updateTime == null && other.updateTime != null) || (this.updateTime != null && !this.updateTime.equals(other.updateTime))) {
+            		return false;
+        	}
+        	if ((this.addedByUserId == null && other.addedByUserId != null) || (this.addedByUserId != null && !this.addedByUserId.equals(other.addedByUserId))) {
+            		return false;
+        	}
+        	if ((this.updatedByUserId == null && other.updatedByUserId != null) || (this.updatedByUserId != null && !this.updatedByUserId.equals(other.updatedByUserId))) {
+            		return false;
+        	}
+		return true;
+	}
+	public static String getEnumName(String fieldName ) {
+		//Later TODO
+		//return super.getEnumName(fieldName);
+		return null;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/413fcb68/security-admin/src/main/java/org/apache/ranger/entity/XXGroup.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXGroup.java b/security-admin/src/main/java/org/apache/ranger/entity/XXGroup.java
new file mode 100644
index 0000000..1e25eb6
--- /dev/null
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXGroup.java
@@ -0,0 +1,275 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ package org.apache.ranger.entity;
+
+/**
+ * Group
+ * 
+ */
+
+import java.util.*;
+
+import javax.persistence.*;
+import javax.xml.bind.annotation.*;
+
+import org.apache.ranger.common.*;
+import org.apache.ranger.entity.*;
+
+
+@Entity
+@Table(name="x_group")
+@XmlRootElement
+public class XXGroup extends XXDBBase implements java.io.Serializable {
+	private static final long serialVersionUID = 1L;
+
+	@Id
+	@SequenceGenerator(name="X_GROUP_SEQ",sequenceName="X_GROUP_SEQ",allocationSize=1)
+	@GeneratedValue(strategy=GenerationType.AUTO,generator="X_GROUP_SEQ")
+	@Column(name="ID")
+	protected Long id;
+	@Override
+	public void setId(Long id) {
+		this.id=id;
+	}
+	@Override
+	public Long getId() {
+		return id;
+	}
+	/**
+	 * Name
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>1024</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="GROUP_NAME"  , nullable=false , length=1024)
+	protected String name;
+
+	/**
+	 * Description
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>4000</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="DESCR"  , nullable=false , length=4000)
+	protected String description;
+
+	/**
+	 * Status
+	 * <ul>
+	 * <li>This attribute is of type enum CommonEnums::ActiveStatus
+	 * </ul>
+	 *
+	 */
+	@Column(name="STATUS"  , nullable=false )
+	protected int status = XAConstants.STATUS_DISABLED;
+
+	/**
+	 * Type of group
+	 * <ul>
+	 * <li>This attribute is of type enum CommonEnums::XAGroupType
+	 * </ul>
+	 *
+	 */
+	@Column(name="GROUP_TYPE"  , nullable=false )
+	protected int groupType = AppConstants.XA_GROUP_UNKNOWN;
+	
+	@Column(name="GROUP_SRC"  , nullable=false )
+	protected int groupSource = XACommonEnums.GROUP_INTERNAL;
+
+	/**
+	 * Id of the credential store
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="CRED_STORE_ID"   )
+	protected Long credStoreId;
+
+
+	/**
+	 * Default constructor. This will set all the attributes to default value.
+	 */
+	public XXGroup ( ) {
+		status = XAConstants.STATUS_DISABLED;
+		groupType = AppConstants.XA_GROUP_UNKNOWN;
+		groupSource = XACommonEnums.GROUP_INTERNAL;
+	}
+
+	@Override
+	public int getMyClassType( ) {
+	    return AppConstants.CLASS_TYPE_XA_GROUP;
+	}
+
+	@Override
+	public String getMyDisplayValue() {
+		return getDescription( );
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>name</b>.
+	 * You cannot set null to the attribute.
+	 * @param name Value to set member attribute <b>name</b>
+	 */
+	public void setName( String name ) {
+		this.name = name;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>name</b>
+	 * @return String - value of member attribute <b>name</b>.
+	 */
+	public String getName( ) {
+		return this.name;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>description</b>.
+	 * You cannot set null to the attribute.
+	 * @param description Value to set member attribute <b>description</b>
+	 */
+	public void setDescription( String description ) {
+		this.description = description;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>description</b>
+	 * @return String - value of member attribute <b>description</b>.
+	 */
+	public String getDescription( ) {
+		return this.description;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>status</b>.
+	 * You cannot set null to the attribute.
+	 * @param status Value to set member attribute <b>status</b>
+	 */
+	public void setStatus( int status ) {
+		this.status = status;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>status</b>
+	 * @return int - value of member attribute <b>status</b>.
+	 */
+	public int getStatus( ) {
+		return this.status;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>groupType</b>.
+	 * You cannot set null to the attribute.
+	 * @param groupType Value to set member attribute <b>groupType</b>
+	 */
+	public void setGroupType( int groupType ) {
+		this.groupType = groupType;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>groupType</b>
+	 * @return int - value of member attribute <b>groupType</b>.
+	 */
+	public int getGroupType( ) {
+		return this.groupType;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>credStoreId</b>.
+	 * You cannot set null to the attribute.
+	 * @param credStoreId Value to set member attribute <b>credStoreId</b>
+	 */
+	public void setCredStoreId( Long credStoreId ) {
+		this.credStoreId = credStoreId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>credStoreId</b>
+	 * @return Long - value of member attribute <b>credStoreId</b>.
+	 */
+	public Long getCredStoreId( ) {
+		return this.credStoreId;
+	}
+
+
+
+	/**
+	 * This return the bean content in string format
+	 * @return formatedStr
+	*/
+	@Override
+	public String toString( ) {
+		String str = "XXGroup={";
+		str += super.toString();
+		str += "name={" + name + "} ";
+		str += "description={" + description + "} ";
+		str += "status={" + status + "} ";
+		str += "groupType={" + groupType + "} ";
+		str += "credStoreId={" + credStoreId + "} ";
+		str += "groupSrc={" + groupSource + "} ";
+		str += "}";
+		return str;
+	}
+	
+	public int getGroupSource() {
+		return groupSource;
+	}
+
+	public void setGroupSource(int groupSource) {
+		this.groupSource = groupSource;
+	}
+
+	/**
+	 * Checks for all attributes except referenced db objects
+	 * @return true if all attributes match
+	*/
+	@Override
+	public boolean equals( Object obj) {
+		if ( !super.equals(obj) ) {
+			return false;
+		}
+		XXGroup other = (XXGroup) obj;
+        	if ((this.name == null && other.name != null) || (this.name != null && !this.name.equals(other.name))) {
+            		return false;
+        	}
+        	if ((this.description == null && other.description != null) || (this.description != null && !this.description.equals(other.description))) {
+            		return false;
+        	}
+		if( this.status != other.status ) return false;
+		if( this.groupType != other.groupType ) return false;
+        	if ((this.credStoreId == null && other.credStoreId != null) || (this.credStoreId != null && !this.credStoreId.equals(other.credStoreId))) {
+            		return false;
+        	}
+		return true;
+	}
+	public static String getEnumName(String fieldName ) {
+		if( fieldName.equals("status") ) {
+			return "CommonEnums.ActiveStatus";
+		}
+		if( fieldName.equals("groupType") ) {
+			return "CommonEnums.XAGroupType";
+		}
+		//Later TODO
+		//return super.getEnumName(fieldName);
+		return null;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/413fcb68/security-admin/src/main/java/org/apache/ranger/entity/XXGroupGroup.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXGroupGroup.java b/security-admin/src/main/java/org/apache/ranger/entity/XXGroupGroup.java
new file mode 100644
index 0000000..d7997cb
--- /dev/null
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXGroupGroup.java
@@ -0,0 +1,196 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ package org.apache.ranger.entity;
+
+/**
+ * Group of groups
+ * 
+ */
+
+import java.util.*;
+
+import javax.persistence.*;
+import javax.xml.bind.annotation.*;
+
+import org.apache.ranger.common.*;
+import org.apache.ranger.entity.*;
+
+
+@Entity
+@Table(name="x_group_groups")
+@XmlRootElement
+public class XXGroupGroup extends XXDBBase implements java.io.Serializable {
+	private static final long serialVersionUID = 1L;
+
+	@Id
+	@SequenceGenerator(name="X_GROUP_GROUPS_SEQ",sequenceName="X_GROUP_GROUPS_SEQ",allocationSize=1)
+	@GeneratedValue(strategy=GenerationType.AUTO,generator="X_GROUP_GROUPS_SEQ")
+	@Column(name="ID")
+	protected Long id;
+	@Override
+	public void setId(Long id) {
+		this.id=id;
+	}
+	@Override
+	public Long getId() {
+		return id;
+	}
+	/**
+	 * Name
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>1024</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="GROUP_NAME"  , nullable=false , length=1024)
+	protected String name;
+
+	/**
+	 * Id of the parent group
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="P_GROUP_ID"   )
+	protected Long parentGroupId;
+
+
+	/**
+	 * Id of the group
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="GROUP_ID"   )
+	protected Long groupId;
+
+
+	/**
+	 * Default constructor. This will set all the attributes to default value.
+	 */
+	public XXGroupGroup ( ) {
+	}
+
+	@Override
+	public int getMyClassType( ) {
+	    return AppConstants.CLASS_TYPE_XA_GROUP_GROUP;
+	}
+
+	@Override
+	public String getMyDisplayValue() {
+		return getName( );
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>name</b>.
+	 * You cannot set null to the attribute.
+	 * @param name Value to set member attribute <b>name</b>
+	 */
+	public void setName( String name ) {
+		this.name = name;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>name</b>
+	 * @return String - value of member attribute <b>name</b>.
+	 */
+	public String getName( ) {
+		return this.name;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>parentGroupId</b>.
+	 * You cannot set null to the attribute.
+	 * @param parentGroupId Value to set member attribute <b>parentGroupId</b>
+	 */
+	public void setParentGroupId( Long parentGroupId ) {
+		this.parentGroupId = parentGroupId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>parentGroupId</b>
+	 * @return Long - value of member attribute <b>parentGroupId</b>.
+	 */
+	public Long getParentGroupId( ) {
+		return this.parentGroupId;
+	}
+
+
+	/**
+	 * This method sets the value to the member attribute <b>groupId</b>.
+	 * You cannot set null to the attribute.
+	 * @param groupId Value to set member attribute <b>groupId</b>
+	 */
+	public void setGroupId( Long groupId ) {
+		this.groupId = groupId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>groupId</b>
+	 * @return Long - value of member attribute <b>groupId</b>.
+	 */
+	public Long getGroupId( ) {
+		return this.groupId;
+	}
+
+
+	/**
+	 * This return the bean content in string format
+	 * @return formatedStr
+	*/
+	@Override
+	public String toString( ) {
+		String str = "XXGroupGroup={";
+		str += super.toString();
+		str += "name={" + name + "} ";
+		str += "parentGroupId={" + parentGroupId + "} ";
+		str += "groupId={" + groupId + "} ";
+		str += "}";
+		return str;
+	}
+
+	/**
+	 * Checks for all attributes except referenced db objects
+	 * @return true if all attributes match
+	*/
+	@Override
+	public boolean equals( Object obj) {
+		if ( !super.equals(obj) ) {
+			return false;
+		}
+		XXGroupGroup other = (XXGroupGroup) obj;
+        	if ((this.name == null && other.name != null) || (this.name != null && !this.name.equals(other.name))) {
+            		return false;
+        	}
+        	if ((this.parentGroupId == null && other.parentGroupId != null) || (this.parentGroupId != null && !this.parentGroupId.equals(other.parentGroupId))) {
+            		return false;
+        	}
+        	if ((this.groupId == null && other.groupId != null) || (this.groupId != null && !this.groupId.equals(other.groupId))) {
+            		return false;
+        	}
+		return true;
+	}
+	public static String getEnumName(String fieldName ) {
+		//Later TODO
+		//return super.getEnumName(fieldName);
+		return null;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/413fcb68/security-admin/src/main/java/org/apache/ranger/entity/XXGroupUser.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXGroupUser.java b/security-admin/src/main/java/org/apache/ranger/entity/XXGroupUser.java
new file mode 100644
index 0000000..0c05f15
--- /dev/null
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXGroupUser.java
@@ -0,0 +1,199 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ package org.apache.ranger.entity;
+
+/**
+ * Group of users
+ * 
+ */
+
+import java.util.*;
+
+import javax.persistence.*;
+import javax.xml.bind.annotation.*;
+
+import org.apache.ranger.common.*;
+import org.apache.ranger.entity.*;
+
+
+@Entity
+@Table(name="x_group_users")
+@XmlRootElement
+public class XXGroupUser extends XXDBBase implements java.io.Serializable {
+	private static final long serialVersionUID = 1L;
+
+
+	@Id
+	@SequenceGenerator(name="X_GROUP_USERS_SEQ",sequenceName="X_GROUP_USERS_SEQ",allocationSize=1)
+	@GeneratedValue(strategy=GenerationType.AUTO,generator="X_GROUP_USERS_SEQ")
+	@Column(name="ID")
+	protected Long id;
+	@Override
+	public void setId(Long id) {
+		this.id=id;
+	}
+
+	@Override
+	public Long getId() {
+		return id;
+	}
+
+	/**
+	 * Name
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>1024</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="GROUP_NAME"  , nullable=false , length=1024)
+	protected String name;
+
+	/**
+	 * Id of the group
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="P_GROUP_ID"   )
+	protected Long parentGroupId;
+
+
+	/**
+	 * Id of the user
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="USER_ID"   )
+	protected Long userId;
+
+
+	/**
+	 * Default constructor. This will set all the attributes to default value.
+	 */
+	public XXGroupUser ( ) {
+	}
+
+	@Override
+	public int getMyClassType( ) {
+	    return AppConstants.CLASS_TYPE_XA_GROUP_USER;
+	}
+
+	@Override
+	public String getMyDisplayValue() {
+		return getName( );
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>name</b>.
+	 * You cannot set null to the attribute.
+	 * @param name Value to set member attribute <b>name</b>
+	 */
+	public void setName( String name ) {
+		this.name = name;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>name</b>
+	 * @return String - value of member attribute <b>name</b>.
+	 */
+	public String getName( ) {
+		return this.name;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>parentGroupId</b>.
+	 * You cannot set null to the attribute.
+	 * @param parentGroupId Value to set member attribute <b>parentGroupId</b>
+	 */
+	public void setParentGroupId( Long parentGroupId ) {
+		this.parentGroupId = parentGroupId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>parentGroupId</b>
+	 * @return Long - value of member attribute <b>parentGroupId</b>.
+	 */
+	public Long getParentGroupId( ) {
+		return this.parentGroupId;
+	}
+
+
+	/**
+	 * This method sets the value to the member attribute <b>userId</b>.
+	 * You cannot set null to the attribute.
+	 * @param userId Value to set member attribute <b>userId</b>
+	 */
+	public void setUserId( Long userId ) {
+		this.userId = userId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>userId</b>
+	 * @return Long - value of member attribute <b>userId</b>.
+	 */
+	public Long getUserId( ) {
+		return this.userId;
+	}
+
+
+	/**
+	 * This return the bean content in string format
+	 * @return formatedStr
+	*/
+	@Override
+	public String toString( ) {
+		String str = "XXGroupUser={";
+		str += super.toString();
+		str += "name={" + name + "} ";
+		str += "parentGroupId={" + parentGroupId + "} ";
+		str += "userId={" + userId + "} ";
+		str += "}";
+		return str;
+	}
+
+	/**
+	 * Checks for all attributes except referenced db objects
+	 * @return true if all attributes match
+	*/
+	@Override
+	public boolean equals( Object obj) {
+		if ( !super.equals(obj) ) {
+			return false;
+		}
+		XXGroupUser other = (XXGroupUser) obj;
+        	if ((this.name == null && other.name != null) || (this.name != null && !this.name.equals(other.name))) {
+            		return false;
+        	}
+        	if ((this.parentGroupId == null && other.parentGroupId != null) || (this.parentGroupId != null && !this.parentGroupId.equals(other.parentGroupId))) {
+            		return false;
+        	}
+        	if ((this.userId == null && other.userId != null) || (this.userId != null && !this.userId.equals(other.userId))) {
+            		return false;
+        	}
+		return true;
+	}
+	public static String getEnumName(String fieldName ) {
+		//Later TODO
+		//return super.getEnumName(fieldName);
+		return null;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/413fcb68/security-admin/src/main/java/org/apache/ranger/entity/XXPermMap.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXPermMap.java b/security-admin/src/main/java/org/apache/ranger/entity/XXPermMap.java
new file mode 100644
index 0000000..ecf22f7
--- /dev/null
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXPermMap.java
@@ -0,0 +1,398 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ package org.apache.ranger.entity;
+
+/**
+ * Permission map
+ * 
+ */
+
+import java.util.*;
+
+import javax.persistence.*;
+import javax.xml.bind.annotation.*;
+
+import org.apache.ranger.common.*;
+import org.apache.ranger.entity.*;
+
+
+@Entity
+@Table(name="x_perm_map")
+@XmlRootElement
+public class XXPermMap extends XXDBBase implements java.io.Serializable {
+	private static final long serialVersionUID = 1L;
+
+
+	@Id
+	@SequenceGenerator(name="X_PERM_MAP_SEQ",sequenceName="X_PERM_MAP_SEQ",allocationSize=1)
+	@GeneratedValue(strategy=GenerationType.AUTO,generator="X_PERM_MAP_SEQ")
+	@Column(name="ID")
+	protected Long id;
+	@Override
+	public void setId(Long id) {
+		this.id=id;
+	}
+
+	@Override
+	public Long getId() {
+		return id;
+	}
+
+	/**
+	 * Group to which the permission belongs to
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>1024</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="PERM_GROUP"   , length=1024)
+	protected String permGroup;
+
+	/**
+	 * Id of the resource
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="RES_ID"   )
+	protected Long resourceId;
+
+
+	/**
+	 * Id of the group
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="GROUP_ID"   )
+	protected Long groupId;
+
+
+	/**
+	 * Id of the user
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="USER_ID"   )
+	protected Long userId;
+
+
+	/**
+	 * Permission for user or group
+	 * <ul>
+	 * <li>This attribute is of type enum CommonEnums::XAPermForType
+	 * </ul>
+	 *
+	 */
+	@Column(name="PERM_FOR"  , nullable=false )
+	protected int permFor = AppConstants.XA_PERM_FOR_UNKNOWN;
+
+	/**
+	 * Type of permission
+	 * <ul>
+	 * <li>This attribute is of type enum CommonEnums::XAPermType
+	 * </ul>
+	 *
+	 */
+	@Column(name="PERM_TYPE"  , nullable=false )
+	protected int permType = AppConstants.XA_PERM_TYPE_UNKNOWN;
+
+	/**
+	 * Is recursive
+	 * <ul>
+	 * <li>This attribute is of type enum CommonEnums::BooleanValue
+	 * </ul>
+	 *
+	 */
+	@Column(name="IS_RECURSIVE"  , nullable=false )
+	protected int isRecursive = XAConstants.BOOL_NONE;
+
+	/**
+	 * Is wild card
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="IS_WILD_CARD"  , nullable=false )
+	protected boolean isWildCard = true;
+
+	/**
+	 * Grant is true and revoke is false
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="GRANT_REVOKE"  , nullable=false )
+	protected boolean grantOrRevoke = true;
+	/**
+	 * IP address to which the group belongs to
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>1024</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="IP_ADDRESS"   , length=1024)
+	protected String ipAddress;
+
+	/**
+	 * Default constructor. This will set all the attributes to default value.
+	 */
+	public XXPermMap ( ) {
+		permFor = AppConstants.XA_PERM_FOR_UNKNOWN;
+		permType = AppConstants.XA_PERM_TYPE_UNKNOWN;
+		isRecursive = XAConstants.BOOL_NONE;
+	}
+
+	@Override
+	public int getMyClassType( ) {
+	    return AppConstants.CLASS_TYPE_XA_PERM_MAP;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>permGroup</b>.
+	 * You cannot set null to the attribute.
+	 * @param permGroup Value to set member attribute <b>permGroup</b>
+	 */
+	public void setPermGroup( String permGroup ) {
+		this.permGroup = permGroup;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>permGroup</b>
+	 * @return String - value of member attribute <b>permGroup</b>.
+	 */
+	public String getPermGroup( ) {
+		return this.permGroup;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>resourceId</b>.
+	 * You cannot set null to the attribute.
+	 * @param resourceId Value to set member attribute <b>resourceId</b>
+	 */
+	public void setResourceId( Long resourceId ) {
+		this.resourceId = resourceId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>resourceId</b>
+	 * @return Long - value of member attribute <b>resourceId</b>.
+	 */
+	public Long getResourceId( ) {
+		return this.resourceId;
+	}
+
+
+	/**
+	 * This method sets the value to the member attribute <b>groupId</b>.
+	 * You cannot set null to the attribute.
+	 * @param groupId Value to set member attribute <b>groupId</b>
+	 */
+	public void setGroupId( Long groupId ) {
+		this.groupId = groupId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>groupId</b>
+	 * @return Long - value of member attribute <b>groupId</b>.
+	 */
+	public Long getGroupId( ) {
+		return this.groupId;
+	}
+
+
+	/**
+	 * This method sets the value to the member attribute <b>userId</b>.
+	 * You cannot set null to the attribute.
+	 * @param userId Value to set member attribute <b>userId</b>
+	 */
+	public void setUserId( Long userId ) {
+		this.userId = userId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>userId</b>
+	 * @return Long - value of member attribute <b>userId</b>.
+	 */
+	public Long getUserId( ) {
+		return this.userId;
+	}
+
+
+	/**
+	 * This method sets the value to the member attribute <b>permFor</b>.
+	 * You cannot set null to the attribute.
+	 * @param permFor Value to set member attribute <b>permFor</b>
+	 */
+	public void setPermFor( int permFor ) {
+		this.permFor = permFor;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>permFor</b>
+	 * @return int - value of member attribute <b>permFor</b>.
+	 */
+	public int getPermFor( ) {
+		return this.permFor;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>permType</b>.
+	 * You cannot set null to the attribute.
+	 * @param permType Value to set member attribute <b>permType</b>
+	 */
+	public void setPermType( int permType ) {
+		this.permType = permType;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>permType</b>
+	 * @return int - value of member attribute <b>permType</b>.
+	 */
+	public int getPermType( ) {
+		return this.permType;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>isRecursive</b>.
+	 * You cannot set null to the attribute.
+	 * @param isRecursive Value to set member attribute <b>isRecursive</b>
+	 */
+	public void setIsRecursive( int isRecursive ) {
+		this.isRecursive = isRecursive;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>isRecursive</b>
+	 * @return int - value of member attribute <b>isRecursive</b>.
+	 */
+	public int getIsRecursive( ) {
+		return this.isRecursive;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>isWildCard</b>.
+	 * You cannot set null to the attribute.
+	 * @param isWildCard Value to set member attribute <b>isWildCard</b>
+	 */
+	public void setIsWildCard( boolean isWildCard ) {
+		this.isWildCard = isWildCard;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>isWildCard</b>
+	 * @return boolean - value of member attribute <b>isWildCard</b>.
+	 */
+	public boolean isIsWildCard( ) {
+		return this.isWildCard;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>grantOrRevoke</b>.
+	 * You cannot set null to the attribute.
+	 * @param grantOrRevoke Value to set member attribute <b>grantOrRevoke</b>
+	 */
+	public void setGrantOrRevoke( boolean grantOrRevoke ) {
+		this.grantOrRevoke = grantOrRevoke;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>grantOrRevoke</b>
+	 * @return boolean - value of member attribute <b>grantOrRevoke</b>.
+	 */
+	public boolean isGrantOrRevoke( ) {
+		return this.grantOrRevoke;
+	}
+
+	public String getIpAddress() {
+		return ipAddress;
+	}
+
+	public void setIpAddress(String ipAddress) {
+		this.ipAddress = ipAddress;
+	}
+
+	/**
+	 * This return the bean content in string format
+	 * @return formatedStr
+	*/
+	@Override
+	public String toString( ) {
+		String str = "XXPermMap={";
+		str += super.toString();
+		str += "permGroup={" + permGroup + "} ";
+		str += "resourceId={" + resourceId + "} ";
+		str += "groupId={" + groupId + "} ";
+		str += "userId={" + userId + "} ";
+		str += "permFor={" + permFor + "} ";
+		str += "permType={" + permType + "} ";
+		str += "isRecursive={" + isRecursive + "} ";
+		str += "isWildCard={" + isWildCard + "} ";
+		str += "grantOrRevoke={" + grantOrRevoke + "} ";
+		str += "}";
+		return str;
+	}
+
+	/**
+	 * Checks for all attributes except referenced db objects
+	 * @return true if all attributes match
+	*/
+	@Override
+	public boolean equals( Object obj) {
+		if ( !super.equals(obj) ) {
+			return false;
+		}
+		XXPermMap other = (XXPermMap) obj;
+        	if ((this.permGroup == null && other.permGroup != null) || (this.permGroup != null && !this.permGroup.equals(other.permGroup))) {
+            		return false;
+        	}
+        	if ((this.resourceId == null && other.resourceId != null) || (this.resourceId != null && !this.resourceId.equals(other.resourceId))) {
+            		return false;
+        	}
+        	if ((this.groupId == null && other.groupId != null) || (this.groupId != null && !this.groupId.equals(other.groupId))) {
+            		return false;
+        	}
+        	if ((this.userId == null && other.userId != null) || (this.userId != null && !this.userId.equals(other.userId))) {
+            		return false;
+        	}
+		if( this.permFor != other.permFor ) return false;
+		if( this.permType != other.permType ) return false;
+		if( this.isRecursive != other.isRecursive ) return false;
+		if( this.isWildCard != other.isWildCard ) return false;
+		if( this.grantOrRevoke != other.grantOrRevoke ) return false;
+		return true;
+	}
+	public static String getEnumName(String fieldName ) {
+		if( fieldName.equals("permFor") ) {
+			return "CommonEnums.XAPermForType";
+		}
+		if( fieldName.equals("permType") ) {
+			return "CommonEnums.XAPermType";
+		}
+		if( fieldName.equals("isRecursive") ) {
+			return "CommonEnums.BooleanValue";
+		}
+		//Later TODO
+		//return super.getEnumName(fieldName);
+		return null;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/413fcb68/security-admin/src/main/java/org/apache/ranger/entity/XXPolicyExportAudit.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXPolicyExportAudit.java b/security-admin/src/main/java/org/apache/ranger/entity/XXPolicyExportAudit.java
new file mode 100644
index 0000000..fe0e542
--- /dev/null
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXPolicyExportAudit.java
@@ -0,0 +1,312 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ package org.apache.ranger.entity;
+
+/**
+ * Audit Log for Policy Export
+ *
+ */
+
+import java.util.*;
+
+import javax.persistence.*;
+import javax.xml.bind.annotation.*;
+
+import org.apache.ranger.common.*;
+import org.apache.ranger.entity.*;
+
+
+@Entity
+@Table(name="x_policy_export_audit")
+@XmlRootElement
+public class XXPolicyExportAudit extends XXDBBase implements java.io.Serializable {
+	private static final long serialVersionUID = 1L;
+
+
+	@Id
+	@SequenceGenerator(name="X_POLICY_EXPORT_SEQ",sequenceName="X_POLICY_EXPORT_SEQ",allocationSize=1)
+	@GeneratedValue(strategy=GenerationType.AUTO,generator="X_POLICY_EXPORT_SEQ")
+	@Column(name="ID")
+	protected Long id;
+	@Override
+	public void setId(Long id) {
+		this.id=id;
+	}
+
+	@Override
+	public Long getId() {
+		return id;
+	}
+
+	/**
+	 * XA Agent IP Address
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>255</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="CLIENT_IP"  , nullable=false , length=255)
+	protected String clientIP;
+
+	/**
+	 * XA Agent Id
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>255</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="AGENT_ID"   , length=255)
+	protected String agentId;
+
+	/**
+	 * Last update timestamp in request
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="REQ_EPOCH"  , nullable=false )
+	protected Long requestedEpoch;
+
+	/**
+	 * Date and time of the last policy update
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Temporal(TemporalType.TIMESTAMP)
+	@Column(name="LAST_UPDATED"   )
+	protected Date lastUpdated;
+
+	/**
+	 * Name of the Asset
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>1024</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="REPOSITORY_NAME"   , length=1024)
+	protected String repositoryName;
+
+	/**
+	 * JSON of the policies exported
+	 * <ul>
+	 * <li>The maximum length for this attribute is <b>30000</b>.
+	 * </ul>
+	 *
+	 */
+	@Column(name="EXPORTED_JSON"   , length=30000)
+	protected String exportedJson;
+
+	/**
+	 * HTTP Response Code
+	 * <ul>
+	 * </ul>
+	 *
+	 */
+	@Column(name="HTTP_RET_CODE"  , nullable=false )
+	protected int httpRetCode;
+
+	/**
+	 * Default constructor. This will set all the attributes to default value.
+	 */
+	public XXPolicyExportAudit ( ) {
+	}
+
+	@Override
+	public int getMyClassType( ) {
+	    return AppConstants.CLASS_TYPE_XA_POLICY_EXPORT_AUDIT;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>clientIP</b>.
+	 * You cannot set null to the attribute.
+	 * @param clientIP Value to set member attribute <b>clientIP</b>
+	 */
+	public void setClientIP( String clientIP ) {
+		this.clientIP = clientIP;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>clientIP</b>
+	 * @return String - value of member attribute <b>clientIP</b>.
+	 */
+	public String getClientIP( ) {
+		return this.clientIP;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>agentId</b>.
+	 * You cannot set null to the attribute.
+	 * @param agentId Value to set member attribute <b>agentId</b>
+	 */
+	public void setAgentId( String agentId ) {
+		this.agentId = agentId;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>agentId</b>
+	 * @return String - value of member attribute <b>agentId</b>.
+	 */
+	public String getAgentId( ) {
+		return this.agentId;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>requestedEpoch</b>.
+	 * You cannot set null to the attribute.
+	 * @param requestedEpoch Value to set member attribute <b>requestedEpoch</b>
+	 */
+	public void setRequestedEpoch( Long requestedEpoch ) {
+		this.requestedEpoch = requestedEpoch;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>requestedEpoch</b>
+	 * @return Long - value of member attribute <b>requestedEpoch</b>.
+	 */
+	public Long getRequestedEpoch( ) {
+		return this.requestedEpoch;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>lastUpdated</b>.
+	 * You cannot set null to the attribute.
+	 * @param lastUpdated Value to set member attribute <b>lastUpdated</b>
+	 */
+	public void setLastUpdated( Date lastUpdated ) {
+		this.lastUpdated = lastUpdated;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>lastUpdated</b>
+	 * @return Date - value of member attribute <b>lastUpdated</b>.
+	 */
+	public Date getLastUpdated( ) {
+		return this.lastUpdated;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>repositoryName</b>.
+	 * You cannot set null to the attribute.
+	 * @param repositoryName Value to set member attribute <b>repositoryName</b>
+	 */
+	public void setRepositoryName( String repositoryName ) {
+		this.repositoryName = repositoryName;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>repositoryName</b>
+	 * @return String - value of member attribute <b>repositoryName</b>.
+	 */
+	public String getRepositoryName( ) {
+		return this.repositoryName;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>exportedJson</b>.
+	 * You cannot set null to the attribute.
+	 * @param exportedJson Value to set member attribute <b>exportedJson</b>
+	 */
+	public void setExportedJson( String exportedJson ) {
+		this.exportedJson = exportedJson;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>exportedJson</b>
+	 * @return String - value of member attribute <b>exportedJson</b>.
+	 */
+	public String getExportedJson( ) {
+		return this.exportedJson;
+	}
+
+	/**
+	 * This method sets the value to the member attribute <b>httpRetCode</b>.
+	 * You cannot set null to the attribute.
+	 * @param httpRetCode Value to set member attribute <b>httpRetCode</b>
+	 */
+	public void setHttpRetCode( int httpRetCode ) {
+		this.httpRetCode = httpRetCode;
+	}
+
+	/**
+	 * Returns the value for the member attribute <b>httpRetCode</b>
+	 * @return int - value of member attribute <b>httpRetCode</b>.
+	 */
+	public int getHttpRetCode( ) {
+		return this.httpRetCode;
+	}
+
+	/**
+	 * This return the bean content in string format
+	 * @return formatedStr
+	*/
+	@Override
+	public String toString( ) {
+		String str = "XXPolicyExportAudit={";
+		str += super.toString();
+		str += "clientIP={" + clientIP + "} ";
+		str += "agentId={" + agentId + "} ";
+		str += "requestedEpoch={" + requestedEpoch + "} ";
+		str += "lastUpdated={" + lastUpdated + "} ";
+		str += "repositoryName={" + repositoryName + "} ";
+		str += "exportedJson={" + exportedJson + "} ";
+		str += "httpRetCode={" + httpRetCode + "} ";
+		str += "}";
+		return str;
+	}
+
+	/**
+	 * Checks for all attributes except referenced db objects
+	 * @return true if all attributes match
+	*/
+	@Override
+	public boolean equals( Object obj) {
+		if ( !super.equals(obj) ) {
+			return false;
+		}
+		XXPolicyExportAudit other = (XXPolicyExportAudit) obj;
+        	if ((this.clientIP == null && other.clientIP != null) || (this.clientIP != null && !this.clientIP.equals(other.clientIP))) {
+            		return false;
+        	}
+        	if ((this.agentId == null && other.agentId != null) || (this.agentId != null && !this.agentId.equals(other.agentId))) {
+            		return false;
+        	}
+        	if ((this.requestedEpoch == null && other.requestedEpoch != null) || (this.requestedEpoch != null && !this.requestedEpoch.equals(other.requestedEpoch))) {
+            		return false;
+        	}
+        	if ((this.lastUpdated == null && other.lastUpdated != null) || (this.lastUpdated != null && !this.lastUpdated.equals(other.lastUpdated))) {
+            		return false;
+        	}
+        	if ((this.repositoryName == null && other.repositoryName != null) || (this.repositoryName != null && !this.repositoryName.equals(other.repositoryName))) {
+            		return false;
+        	}
+        	if ((this.exportedJson == null && other.exportedJson != null) || (this.exportedJson != null && !this.exportedJson.equals(other.exportedJson))) {
+            		return false;
+        	}
+		if( this.httpRetCode != other.httpRetCode ) return false;
+		return true;
+	}
+	public static String getEnumName(String fieldName ) {
+		//Later TODO
+		//return super.getEnumName(fieldName);
+		return null;
+	}
+
+}