I am concatenating  two Integer ids through bitwise operations(as described below) to create a single primary key of type long. I wanted to know if this is a good practice. This would help me in keeping multiple rows of an entity in a single column family by appending different extensions to the entityId.
Are there better ways ? My Ids are of type Integer(4 bytes).

    public static final long makeCompositeKey(int k1, int k2){
        return (long)k1 << 32 | k2;