protected Type typeOfPK() {
        final long pks = primaryKeyColumns().count();

        if (pks == 0) {
            return DefaultType.list(DefaultType.WILDCARD);
        }

        final Column firstColumn = columnsFromPks()
                .findFirst().orElseThrow(() -> new SpeedmentTranslatorException(
                    "Table '" + table().get().getId() + 
                    "' did not contain any primary key columns."
                ));
        
        Type firstType = typeMappers().get(firstColumn).getJavaType(firstColumn);
        if (DefaultType.isPrimitive(firstType)) {
            firstType = DefaultType.wrapperFor(firstType);
        }

        if (pks == 1) {
            return firstType;
        } else if (columnsFromPks()
            .map(c -> typeMappers().get(c).getJavaType(c))
            .allMatch(firstType::equals)) {
            
            return DefaultType.list(firstType);
        } else {
            return DefaultType.list(DefaultType.WILDCARD);
        }
    }
@author pemi
@param <T> type of model to translate into
generator-parent/generator-translator/src/main/java/com/speedment/generator/translator/AbstractEntityAndManagerTranslator.java