/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.identity.Identity
 *  com.l7tech.identity.mapping.PersistentAttributeMapping
 *  com.l7tech.objectmodel.AttributeHeader
 *  com.l7tech.objectmodel.PersistentEntity
 */
package com.l7tech.server.identity.mapping;

import com.l7tech.identity.Identity;
import com.l7tech.identity.mapping.PersistentAttributeMapping;
import com.l7tech.objectmodel.AttributeHeader;
import com.l7tech.objectmodel.PersistentEntity;
import com.l7tech.server.identity.mapping.a;

abstract class b<MT extends PersistentAttributeMapping>
extends a<MT> {
    protected b(MT MT) {
        super(MT);
    }

    @Override
    public Object[] extractValues(Identity identity) {
        Object[] objectArray = super.extractValues(identity);
        if (objectArray != null && objectArray.length > 0) {
            return objectArray;
        }
        AttributeHeader attributeHeader = ((PersistentAttributeMapping)this.mapping).getAttributeConfig().getHeader();
        if (identity instanceof PersistentEntity && (attributeHeader == PersistentAttributeMapping.PERSISTENT_OID || attributeHeader == PersistentAttributeMapping.PERSISTENT_GOID)) {
            return this.a(((PersistentEntity)identity).getGoid());
        }
        return this.EMPTY;
    }
}

