A comment about assigning the class letter P, J, or X to a connector. The class letter for a connector is NOT based on the gender of the connector. The question then becomes what class letter to apply to a genderless connector, like an APC-7, or a connector that has both genders? From ANSI/ASME Y14.44 and IEEE 315 clause 24 standards, the rule is you have to look at a mating pair to determine which is the most movable and which is the most fixed. The most fixed takes a J (or X, depending) and the most movable takes a P. And if you have two cables that connect together both connectors use the P class letter.
Another question you had, whether you realize it or not, was how to handle the reference designation on the schematic diagram(s) if (1) the connector was soldered to a PCB ASSY (PCBA) and protruded through a hole in a panel. The connector would be part of the PCBA and on the parts list (PL) and schematic diagram for the PCBA. (2) If the connector was mounted by hardware to a panel and then soldered directly to a PCBA the same rule would apply as number (1). (3) If the connector was mounted to a panel and then connected to a PCBA with wires you would need a separate schematic diagram of the panel, probably with wires attached (wire uses class letter W), and then an interconnect schematic showing the connections. If you wanted to show the whole thing on a single schematic diagram and the panel was separate from the rest of the box or container then you would use, say, ref des prefix A1 for the panel and ref des prefix A2 for the PCBA. You then would have to have a schematic diagram for the PCB that was a subset of the whole schematic wherein you would strip away all the other parts/components that were not part of the PCBA. It all depends on how you provision it.